View unanswered posts | View active topics It is currently Thu May 21, 2026 12:30 pm



Reply to topic  [ 7 posts ] 
 Exporting TWA Files 
Author Message
Captain
User avatar

Joined: Sat Jun 18, 2005 2:00 am
Posts: 2214
Location: USA
Unread post 
I have a question regarding how to preserve a newly banged game, the general editor settings, ships, aliens, planets, etc. Do you just need the highlighed local files or do you need the global files as well? If you do not need the global files what are the for, are they just a compilation of the server's information gathered from each seperate game.

Also what is the process of importing the TWA file, do you first import it over the game you wish to modify, (by highlighting it first and then selecting import) and then do you rebang the game to get ride of the previous user data and seed number, (I say this because when I did it this way the user data was in the game that I modified until I rebanged it and chose to import all existing data, ships, aliens, planets, editor settings, etc.) After I did this the user information was gone, though the editor settings and ship edits I made were still there. Thanks in advance for your assistance.

_________________
Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact!
Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!


Fri Jul 08, 2005 7:47 am
Profile ICQ WWW
Ensign

Joined: Fri Mar 02, 2001 3:00 am
Posts: 227
Location: USA
Unread post 
The exporting of games to TWA files is to help backup your games, and to share them with other peeps.

As for global files/settings, it is always best to have one generic game that has the global files exported with it. The reason for this is because of there being specific game settings that are actually global, or server wide, settings. Such as ship movement and commands per cycle to just name a couple. If for some reason your server's box should take a dive, you will need to remember your global settings when setting up the first game.

As for inporting of games from a TWA file. If you are creating a game and you do any exporting of that game during the creation of it. Then you need. Then do not import any previous version of the game over a game that you have changed since the last export. As you have noticed, all new information/edits will be lost.

If you plan to edit a game from a TWA file. Then you need to import it first and then edit it for what you need.

Never rebang a game if you plan to keep the current user accounts in the game.

If you are trying to setup a closed game, then you need to bigbang the a game, inport a game from TWA file, make any and all modifications and then add all the player accounts. Once that is done export the game to a TWA file for backup.

So, these are the steps you need to do:

Exporting game that you create:
1) Bigbang a game.
2) Modify the game as needed.
3) backup the game, during creations, to TWA file
4) repeat steps 2 & 3 until game is complete.

Inporting a game for use:
1) Bigbang a game.
2) Inport game from TWA file over new game.
3) Modify the game as needed.
4) Make backup TWA's of the game.
5) Repeat steps 3 & 4 until game is as you need it.
6) Add player accounts, if needed.
5) Then make a final backup TWA of the game before opening it to the players.

It is also best to periodically backup the game while it is being played. To help in bringing the game backup once you have a server problem. All major server sysops have their own views on how, and when, to do this.

_________________
The WABBIT
ICQ# 12988803


Tue Jul 12, 2005 2:28 am
Profile ICQ
Captain
User avatar

Joined: Sat Jun 18, 2005 2:00 am
Posts: 2214
Location: USA
Unread post 
Outstanding, thank you WABBIT, you do mean to select all of the options for the global portion of the export right? Because there are eleven of them to choose from, (just want to make sure.) [:D]

Also on the global settings, is 'Game A' always the game used by TWGS to pass on the system default's to the other games on that server? Additionally I would like to include those global settings in the project im working on, which global settings are passed onto the other games besides 'Ship Movement Delay' and 'Commands per Cycle'?

On a sidenote when you export a game for use as a featured edit (or whatever), it will maintain the system date that it was initially exported and saved right? So say one month has past before it is actually imported and used, it will set that game at 30-days old (approximately) until it is rebanged, correct?

Oh and regarding the game backups, what files need to be backed up (Are these files are found in the game directory for each game?) and is there anybody familiar with batch commands that can give an example of how to set the game backups to be automated and create a new filename for each day of the week, revolving over a period of 7-days (if this is even possible to do with batch commands?) Also is there a way to tell TWGS to run a batch file at a certain time or times each day?

_________________
Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact!
Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!


Tue Jul 12, 2005 6:05 am
Profile ICQ WWW
Lieutenant J.G.

Joined: Fri Apr 05, 2002 3:00 am
Posts: 332
Location: USA
Unread post 
quote:Originally posted by RexxCrow

Also on the global settings, is 'Game A' always the game used by TWGS to pass on the system default's to the other games on that server?
I'm pretty sure if you use "default settings", it means exactly what it says. Defaults. The same settings you get when you first install the server and create your first game. Except the global options, which remain the same since they affect every game on the server (unless you import a TWA that had exported twglob.dat).

quote:Additionally I would like to include those global settings in the project im working on, which global settings are passed onto the other games besides 'Ship Movement Delay' and 'Commands per Cycle'?
Code:
This file is in ../twglob.dat.  Master game directory. 4096 bytes

00-3C   Sysop name (as 61-byte Pascal string)
3D-78   BBS name (as 61-byte Pascal string)
79-89   TWv3 Reg code (as 17-byte Pascal string)
8A-91   Gold reg code (array of 4 shorts, hashed in some fashion)
92-95   TEdit password (long int hash)
96-99   Global flags (32 flags, see below)
9A   Days Til Deletion
9B-9C   Daily log limit
9D-9E   Sysop sec level
9F   Desqview pacing
A0   Max commands per poll interval
A1   Data segment (255 = 256, 0 = None, 3 = 4)
A2   Ship delay
A3   Ether delay
A4   Poll interval
A5-A6   Ack interval
A7-A8   Inactive time
A9-FFC   Unused bytes (3923)
FFD   Revision
FFE   MajorVersion
FFF   MinorVersion

Global flags:
   VUTS RQPO NMLK JIHG FEDC BA98 7654 3210
   (V-8 all unused)
   7 - Unused   6 - Unused   5 - Unused   4 - Beeper
   3 - GoldExpert   2 - AlienSleep   1 - Local disp   0 - Aliases

So, the key point is global settings include the following options on Tedit screen H: KLRTYS1259ZX\;| and the following options on screen G: EIWXYZ.

quote:On a sidenote when you export a game for use as a featured edit (or whatever), it will maintain the system date that it was initially exported and saved right? So say one month has past before it is actually imported and used, it will set that game at 30-days old (approximately) until it is rebanged, correct?
System date isn't saved, exactly, but the game age is. I suspect (but haven't confirmed) that when importing a TWA it automatically performs something like option B in Tedit, a synching of your system clock with the game's "today". As for age of game in days, that's in twcfig.dat (and thus will be saved if you exported that file into the TWA).

quote:Oh and regarding the game backups, what files need to be backed up (Are these files are found in the game directory for each game?) and is there anybody familiar with batch commands that can give an example of how to set the game backups to be automated and create a new filename for each day of the week, revolving over a period of 7-days (if this is even possible to do with batch commands?) Also is there a way to tell TWGS to run a batch file at a certain time or times each day?
The files you need to back up to keep the game safe are, to simplify, the entire game directory (by default, a subdirectory of the subdirectory "game" under your TWGS folder.. e.g. c:\twgs\game\gamedir). To automatically run a program or batch file with TWGS, stop the server, click Configure (this button is disabled while the server is running, thus the first step), and go to the Scheduler tab. Type a name (any name, this is only for your reference) and click Add. There you can browse for the file to run and set a time and frequency for it to run (hourly, daily, or weekly). You can even tell it to shut down the server to run the program if necessary. For a backup, I'd recommend shutting down for a few seconds to make sure the files don't get copied in an incomplete state (e.g. if someone is placing some fighters just as the backup occurs, if the backup needs to be restored, the fighter count might be updated but not the owner, so you could end up with figs belonging to no one..that sort of thing).

As for setting up a batch file to dynamically name a backup directory to include today's date, I know it's possible (I've seen some incredibly complex batch files in my time), but haven't personally made any non-trivial batch files before. I'd probably just write a one-off C++ program to do it. In fact, I may just make a TW backup program if there's interest. Configurable to how many days of backups to keep and such. I recently added registry access to the other project I'm working on (the data file reader) so my programs can automatically discover the directories of any running TW games instead of asking the user to type them in every time it's run.

_________________
Creator of the TWGS Data Access Library
http://twgs.xiuhtec.com


Wed Jul 13, 2005 4:41 am
Profile ICQ YIM
Captain
User avatar

Joined: Sat Jun 18, 2005 2:00 am
Posts: 2214
Location: USA
Unread post 
Kewl Xen, somehow I knew you would be able to help, LOL. I hope to one day talk about programming the way you do, well I will just whip up a quick C++ program and then have a bagel... and a martini (what the hell!) hehe LMAO [^]

"I recently added registry access to the other project I'm working on (the data file reader) so my programs can automatically discover the directories of any running TW games instead of asking the user to type them in every time it's run."

That's what I am talking about, programmers that actually put foresight into what they are creating, outstanding Xen!

I am positive there is interest for a program such as this, I assumed that something like that might already exist though; go figure. heh! It would be a nice feature to have incorporated into TWGS itself, but until then an actual program (or batch) would be a nice reprieve for SysOps.

_________________
Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact!
Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!


Wed Jul 13, 2005 6:19 am
Profile ICQ WWW
Lieutenant J.G.

Joined: Fri Apr 05, 2002 3:00 am
Posts: 332
Location: USA
Unread post 
quote:Originally posted by RexxCrow

"I recently added registry access to the other project I'm working on (the data file reader) so my programs can automatically discover the directories of any running TW games instead of asking the user to type them in every time it's run."

That's what I am talking about, programmers that actually put foresight into what they are creating, outstanding Xen!
Heh, this can be a mixed blessing, though, as my perfectionism and desire to milk every drop of user-unfriendliness out of the code is part of why it's taking me so long to release anything.

_________________
Creator of the TWGS Data Access Library
http://twgs.xiuhtec.com


Wed Jul 13, 2005 7:48 am
Profile ICQ YIM
Captain
User avatar

Joined: Sat Jun 18, 2005 2:00 am
Posts: 2214
Location: USA
Unread post 
Hey though when it is all said and done, you will be responsible for making a utility that will be both appreciated and respected by players and SysOps alike. All that extra time and effort that you put into it will have be worth it, as well as being a personal payoff for ya; thus the extra waiting will all be worth it in the end. But then again everbody is going to be expecting you to pull off miracles like this on a regular basis... don't plan any vacations. LOL

_________________
Your reliance upon subjective IRM's, subjugates you through utter omission, obfuscation, and distortion of fact!
Don't mess with me, I will 26 U.S.C. § 7212(a) your IRS!


Wed Jul 13, 2005 10:23 pm
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 45 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.