DISABLE THIS AD



Reply
 
Thread Tools
Old February 24, 2003, 05:09   #1
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Replacement for Modswapper
I'm thinking through a plan for a replacement for ModSwapper, and I think that the use of gamefile.txt is a bit crude for what functionality I would like to be able to provide (although it will certainly be backwards-compatible with such that setup).

Instead, each mod would have a definition file (called *_ModDef.txt or something like that) - but the question I wish to ask is where that should be placed.

I don't want to put it in the ...\ctp2_data\default\gamedata\ directory, which is already overflowing with mod-related stuff, and I'm tempted to create a new ...\mods\ directory directly in the CTP2 main directory. The alternatives are to put the files directly in ...\ctp2_data\default\ or ...\ctp2_data\ or to create the mods directory in one of these places.

The reason I choose to put the mods directory not inside ctp2_data is that it might be modifying files outside of there (like civ_paths.txt or perhaps userprofile.txt).

Any opinions?
J Bytheway is offline   Reply With Quote
Old February 24, 2003, 09:30   #2
SMIFFGIG
Call to Power II Democracy GameCall to Power II MultiplayerCTP2 Source Code Project
Prince
 
SMIFFGIG's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Jul 2002
Location: Great Britain
Posts: 684
very good idea, so this would mean u would be able to edit parts of the userprofile.txt through a GUI ? Like number of civs etc


Could you also include Color00.txt so you could change your colour ? (not a priority obviously)
__________________
Oxygen should be considered a drug
Tiberian Sun Retro
My Mod for Tiberian Sun Webmaster of
http://www.tiberiumsun.com
SMIFFGIG is offline   Reply With Quote
Old February 24, 2003, 09:58   #3
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,631
Great news I've been playing around with this idea myself for quite some time now, but obviously never got around to implementing it...

Yeah, the gamedata folder is stuffed enough as it is. I
guess a mod-folder would be nice: one could also store other mod-spefic files there. However, anything other than the gamedata folder would be good for me.
__________________
Administrator of WePlayCiv, a brand-new Civ fansite that's all about community -- join us today!
Locutus is offline   Reply With Quote
Old February 24, 2003, 10:41   #4
Devil of Truth
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Prince
 
Devil of Truth's Avatar
 
Local Time: 13:20
Local Date: November 21, 2009
Join Date: Sep 2002
Location: Keep honking... I'm reloading.
Posts: 351
This may cause more headaches than anything else, but could it be possible to have the user define a folder where the index file (and maybe even the mods) are located? This would leave the \ctp2_data\ folders untouched by mods.
__________________
If something doesn't feel right, you're not feeling the right thing.
Devil of Truth is offline   Reply With Quote
Old February 24, 2003, 12:03   #5
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Quote:
Originally posted by Devil of Truth
This may cause more headaches than anything else, but could it be possible to have the user define a folder where the index file (and maybe even the mods) are located? This would leave the \ctp2_data\ folders untouched by mods.
Not really - the mods will probably want to be unzippable easily into the ctp2 directory, and so the definition files will have to be in some standard directory so that all the modmakers can put it in that place in the zip file. Otherwise you'd have to keep shifting files you've installed into the right place, or the process would have to be automated in some fashion which probably wouldn't be easy.

As for having the mods out of ctp2_data - this is possible only if the mods have a whole dedicated copy of ctp2_data, including all the stuff which is the same from mod to mod. This is possible, but it would take up rather a lot of space (although perhaps not too much given the sizes of modern hard disks). In the setup I plan to use each mod will have the option of acting like this (which might be wise if it was a mod which changed a lot, like the space mod), but it can also insert files into the ctp2_data structure in a way much like that in which things are done at present (which is more sensible if it's a mod which just changes colours00.txt, for example).

I suppose it might make sense to have a mod_data directory which was a copy of the ctp2_data directory shared by all mods, and in fact this would not be very hard to implement, but I think that it is unnecessary. You just have to trust the modmakers (and even moreso the mod management utility makers) not to screw things up too badly.

I'll certainly be backing up my ctp2_data directory before I start testing anything, though .

On another note - does anyone have any requests for the ability to modify through the primary GUI any entries of userprofile.txt besides NumPlayers, MaxPlayers and DebugSlic?
J Bytheway is offline   Reply With Quote
Old February 24, 2003, 12:28   #6
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Moderator
 
Martin Gühmann's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,063
Quote:
Originally posted by J Bytheway
On another note - does anyone have any requests for the ability to modify through the primary GUI any entries of userprofile.txt besides NumPlayers, MaxPlayers and DebugSlic?
Well if we start with modifying the userprofile.txt then I would like to have the option to modify all entries, of course on a seperate page so that the avarage user does not need to bother with it if he don't want at least for the less common options.

Another thing I want to have modify ability is the civ3.ldl in the layout folder, it is the equivalent for the gamefile.txt for *.ldl files.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline   Reply With Quote
Old February 24, 2003, 13:14   #7
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,631
Quote:
On another note - does anyone have any requests for the ability to modify through the primary GUI any entries of userprofile.txt besides NumPlayers, MaxPlayers and DebugSlic?
Maybe not in the UI per se, but if the tool could make sure CivIndex is lower than the number of civs in the mod, that would be a great help (a higher number causes crashes).

(Maybe MapPlugin3?)
__________________
Administrator of WePlayCiv, a brand-new Civ fansite that's all about community -- join us today!
Locutus is offline   Reply With Quote
Old February 24, 2003, 19:37   #8
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Quote:
Originally posted by Locutus
Maybe not in the UI per se, but if the tool could make sure CivIndex is lower than the number of civs in the mod, that would be a great help (a higher number causes crashes).
I don't think I can manage that. Determining the number of civs in the mod in not an easy task given the flexibility I have provided.

Quote:
(Maybe MapPlugin3?)
I have that covered via a different method .

Well, I have made a start this afternoon/evening and made notable progress. Unless uni work prevails I should have a first version out within a few days.

Fear not SMIFGIGG and Martin: Color00.txt and civ3.ldl are both included - along with just about every other file you could care to name in the ctp2 folders.

I'm happy to hear other feature requests, but it might be better to wait until you see how it works first - it's very different from ModSwapper.
J Bytheway is offline   Reply With Quote
Old February 24, 2003, 19:52   #9
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 08:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
I would very happy with modswaper-like with civ3.ldl in it.

A second sprite folder (it searchs a sprite in the mod sprite folder if not found looks for it the original folder) is very welcomed

Thats the only thing to I have to complain about modswapper.

Still having separate folders for different mods would make things lot better for modders. Things will be less cluttered. But not that necessary. And I am afraid about the modders dont doing their part.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; February 24, 2003 at 20:04.
Pedrunn is offline   Reply With Quote
Old February 25, 2003, 11:34   #10
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Moderator
 
Martin Gühmann's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,063
Quote:
Originally posted by Pedrunn
A second sprite folder (it searchs a sprite in the mod sprite folder if not found looks for it the original folder) is very welcomed
Well the only problem I see with a second sprite folder is that it has to contain all sprites, as I don't know actual if it is possible to place the sprites into more than one folder. I know that it is possible to place the Great_Library.txt and possible other strings files from the language folder into the default folder.

Another thing we need to know is if the civpath.txt only contains a list of all directory in that the game searches for files or if the order is important like in the gamfile.txt.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline   Reply With Quote
Old February 25, 2003, 11:53   #11
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Quote:
Originally posted by Pedrunn
A second sprite folder (it searchs a sprite in the mod sprite folder if not found looks for it the original folder) is very welcomed
Presuming that appropriate changes to civpaths.txt will make the game search in another directory for sprites, a second sprite folder of this kind is already supported.

Quote:
Originally posted by Pedrunn
Another thing we need to know is if the civpath.txt only contains a list of all directory in that the game searches for files or if the order is important like in the gamfile.txt.
The order must matter, since not all of the entries therein are full directory specifications, just "default", for example.
J Bytheway is offline   Reply With Quote
Old February 25, 2003, 19:34   #12
SMIFFGIG
Call to Power II Democracy GameCall to Power II MultiplayerCTP2 Source Code Project
Prince
 
SMIFFGIG's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Jul 2002
Location: Great Britain
Posts: 684
Im not sure how possible this is or how practical it is either

but would it be possible to select who exactly your opponents are like CIV2

Quote:
quote:
(Maybe MapPlugin3?)


I have that covered via a different method .
Im curious

Anyway looking forward to it

- James
__________________
Oxygen should be considered a drug
Tiberian Sun Retro
My Mod for Tiberian Sun Webmaster of
http://www.tiberiumsun.com
SMIFFGIG is offline   Reply With Quote
Old February 26, 2003, 11:35   #13
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Might as well include the front splash-screen. Some mod-specific ones of those would be good. Maybe the tile files if not done already, though the ATF kinda solves that. It would mean Dale could have his highways though...

Good plan
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline   Reply With Quote
Old February 26, 2003, 18:14   #14
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
I'm trying to replicate the behaviour of ModSwapper in its copying of files, but what I'd like to know is how it handles different language versions? What paths does it copy from/to for the mods' versions of Great_Library.txt? Is this always english, or does it vary?
J Bytheway is offline   Reply With Quote
Old February 27, 2003, 08:44   #15
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
I have a question how the hell do you change the daters on a mod I can change them in a scenario but not in a mod.
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline   Reply With Quote
Old February 27, 2003, 09:03   #16
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Quote:
Originally posted by The Big Mc
I have a question how the hell do you change the daters on a mod I can change them in a scenario but not in a mod.
Daters? What do you mean by daters?
J Bytheway is offline   Reply With Quote
Old February 27, 2003, 09:54   #17
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
dates you no the 3000bc to what ever dates.
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline   Reply With Quote
Old February 27, 2003, 10:11   #18
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 08:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Big Mc, you do realize that you can change the dates through the DiffDB.txt right?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline   Reply With Quote
Old February 27, 2003, 10:13   #19
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
yah but i can't find the file with the dates in it.
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline   Reply With Quote
Old February 27, 2003, 10:14   #20
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Do you mean the kind of alterations you make with turnlength.txt? I believe that is impossible except in scenarios.
J Bytheway is offline   Reply With Quote
Old February 27, 2003, 10:24   #21
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
ahhhghghghghghhfzxigbriabeiu2gi
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline   Reply With Quote
Old February 27, 2003, 11:41   #22
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Moderator
 
Martin Gühmann's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,063
Quote:
Originally posted by J Bytheway
I'm trying to replicate the behaviour of ModSwapper in its copying of files, but what I'd like to know is how it handles different language versions? What paths does it copy from/to for the mods' versions of Great_Library.txt? Is this always english, or does it vary?
No it is not always english it depends on the content of your civpath.txt, here is mine for example:

Code:
.
setup\data\max\ctp_data\videos
default
german
..\..\ctp2_data
..\..\scenarios
.\save
games
queues
mp
scen
maps
clips
gamedata
gamedata
aidata
uidata
uidata\layouts
uidata\fonts
graphics
graphics\sprites
graphics\tiles
graphics\patterns
graphics\pictures
graphics\icons
graphics\cursors
sound
videos
That's the file to look it up how the language folder is named.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline   Reply With Quote
Old February 27, 2003, 12:42   #23
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Quote:
Originally posted by Martin Gühmann
No it is not always english it depends on the content of your civpath.txt, here is mine for example:
So it copies both from and to the language folder there specified? Presumably that means that you have to copy all the files across when you install a mod with only english files?
J Bytheway is offline   Reply With Quote
Old February 27, 2003, 12:57   #24
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Moderator
 
Martin Gühmann's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,063
Quote:
Originally posted by J Bytheway
So it copies both from and to the language folder there specified? Presumably that means that you have to copy all the files across when you install a mod with only english files?
Yes, if you don't have the English version of the game and you have a mod that is not in your language then you have to copy the files on your own to the right location.
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline   Reply With Quote
Old February 27, 2003, 19:31   #25
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Celebration!

For the first time I actually got some mods to appear in my program! And the first thing I discover is that my list box is not nearly big enough . This deserves a screenshot.

Although (as you can see) you have the option to change language, it is initially selected automatically from civpaths.txt, so don't worry about that - I'm trying to make this newbie-friendly and moderately-competant-person-proof (I'd never aspire to fool-proof), which are things at which my programs rarely succeed...

I'm at 1829 lines of code and counting... I didn't think I'd need quite that many, and it'll be longer before it's done. However, considering CTPEd has ~10,000 lines I guess this is still pretty small by comparison... My contemporary Computer Scientists seem to be churning out thousands of lines every day at the moment .
Attached Thumbnails:
image1.png  
J Bytheway is offline   Reply With Quote
Old February 27, 2003, 20:30   #26
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Looking good, John.
Peter Triggs is offline   Reply With Quote
Old February 27, 2003, 21:42   #27
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 08:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
Originally posted by J Bytheway
However, considering CTPEd has ~10,000 lines


And i thought I wasa big-shot by making the city expansion 1,630 slic code. How prepotent

BTW, looks great indeed. Infinite times better than I had imagined with all this new functions
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; February 27, 2003 at 22:57.
Pedrunn is offline   Reply With Quote
Old February 28, 2003, 05:54   #28
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
Pedrunn: I bet 1600 lines of SLIC are harder to debug than even 10,000 lines of Visual Basic .

Another random and probably unimportant question:

Would people prefer this if it appears centre screen or in the Windows default position?
J Bytheway is offline   Reply With Quote
Old February 28, 2003, 15:09   #29
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 12:20
Local Date: November 21, 2009
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
The LOTR slic I just finished has about 3000 lines. About 2/5 of that is messageboxes.

But I'd still rather that than any vB. Good job, John.

*Centrescreen
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline   Reply With Quote
Old February 28, 2003, 18:10   #30
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 11:20
Local Date: November 21, 2009
Join Date: Jul 2001
Location: England
Posts: 3,825
OK, here's a preliminary version. It seems to at least do everything that ModSwapper does and all the obvious further options, but I have yet to test all the advanced stuff that mods are supposedly able to do (since none of the mods that currently exist utilise these features, for obvious reasons, and I'm going to have to make some up to test them).

Have a go and tell me what you think, especially anything which isn't obvious or self-explanatory.

I've provided a minimal readme (basically it only tells you the command line options so that you can create shortcuts for your favorite mods), and a sample mod definition file showing off all the other features (the ones which I haven't tested yet, but feel free to do so yourself )

Either unzip into your main CTP2 directory and run it from there, or else look in the readme to see how you can specify the CTP2 path on the command line.

This is just the executable, and that should be OK for most people since I used only standard Windows Common Controls, but if you're missing .ocx (likely with Windows 95 or 98) files you can get the relevant ones here.

(Incidentally, it totals 2287 lines now)

I hope this doesn't screw up too many peoples' installation's .

[Edit: Attachment removed, obsolete. Find a newer version later in the thread]

Last edited by J Bytheway; November 1, 2003 at 09:48.
J Bytheway is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:20.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © Robert Plomp and Jeroen Schweitzer