Scripting - More features with just a little addition

Scripting, Hashtables and other more fun


Hello, I am Edna Kolanco from Portugal.

I would like this game to expose certain events to be scripted by the mod community.
Specifically, I would like global scripts to be called for every turn. Colony scope scripts executed for every colony at the end of each turn.
I would like also to have access to custom variables. Just like Hashtables/Dictionaries available for planets, starbases and improvements to hold custom data during script processing.
And finally I would like to change the interface to show some of those information.

The central idea is to change how the economy works, but since this may not be well accepted by the majority of the users, I would be very satisfied to have the tools how to do it.

I need that to create custom resources and to defined input and output for the improvements and also completely different formulas.

Kisses from me...
Edna

6,486 views 9 replies
Reply #1 Top
This sort of thing can't be done (I think) since we don't have the source code. Modding changes .xml variables and the way things look, not the way the game plays.
Reply #2 Top
Well - we'll have to find out what the mentioned sdk allows us to do
Reply #4 Top
check out the forums you in before posted there is an excellent write up by moosetek, hope this helps you. I can now view and use my ships in GalCiv 2 but having a little issues with the dummies :\ so work continues on that front.

#1 by Moosetek13
Monday, April 17, 2006 1:07 PM


Trolling
Insightful



There are a few ways, depending on which files are being used. Some people upload the .X model files, some a .shipcfg file along with a .shipclass file or .XML file. In the latter case, the files go into your My Documents\Games\GalCiv2\Ships folder. Then they will be found in the ship builder window, either as a ship that can be upgraded - like the Klingon series of ships - or as jewelry that can be used with Kryo's Hull System Mod.

The .X model files are copied, along with their associated .PNG files, into the C:\Program Files\Stardock\TotalGaming\GalCiv2\Gfx\Models folder (assuming the default install location). Then you will have to modify the GC2Types.XML file, which is found in C:\Program Files\Stardock\TotalGaming\GalCiv2\Data\English.

You can open the .XML files with any text editor, like Notepad or Wordpad. I prefer Wordpad because it keep the formatting and makes the file easier to read.

Open the file and do a search for "hull". You will see various tiny, small, medium, large and huge hulls listed. The sections are basically the same, the difference being the names like Hull1, Hull2, Hull3 etc, and the model and thumbnail files used for each. You can copy a section and paste it at the end of the file - before the ending [/GC2] tag - and modify it to point to your new model.
Here is an example using the Shadow Ship from the Babylon 5 series of ships now being uploaded.


[Hull Name="HugeHull3"]
[DisplayName]Battelcrab[/DisplayName]
[Description]The Shadow ship from Babylon 5.[/Description]
[Cost]160[/Cost]
[Size]80[/Size]
[SensorRange]4[/SensorRange]
[HP]48[/HP]
[Model]Battelcrab[/Model]
[Thumbnail]SHADOW-01a[/Thumbnail]
[Speed]1[/Speed]
[Category]Huge[/Category]
[Logistics]6[/Logistics]
[Tech_Requirement]Massive Scale Building[/Tech_Requirement]
[/Hull]

The models should be renamed - Battelcrab.x to S99_Battelcrab.x - like that.
All the .png and the .x model files go into the GFX\Models folder.
Edit the GC2Types.xml file by adding a section at the end for each model.
In the above example, I associated the Shadow ship with a huge hull. This one is called Hull3 because there is already a Hull0, Hull1 and Hull2 for the huge ships. Just rename the section as is appropriate for your particular GC2Types file. The next one I do as huge will be Hull4, and so on.
Then change the names and descriptions, and indicate which model file and thumbnail file to use. All the models usually come with at least one .png file, and some are better for the actual thumbnail - although the artists rarely make a specific thumbnail file for this for some odd reason.

And in the [Model]Battelcrab[/Model] and [Thumbnail]SHADOW-01a[/Thumbnail] you will notice that only the base filename is used - so the file named S99_Battlecrab.x is referred to as only Battlecrab, without the S99_ or the .x extension, and the thumbnail is shadow-01a without the .png extension.


And I had to change one thing before I could paste the above example into this post.
I had to change the < to [ and the > to ], so you will need to make sure they are changed back if you copy and paste this example. It should be clear once you get into the GC2Types file, as to how the syntax is laid out. Using the Edit-Replace function makes it fast and easy.


Easy 'nuf, right?

Reply #5 Top
Since what Pharacon1 was soooo on topic....

That would be cool to get that information on demand if you wanted it. I would definately like to have a feature like that as well.
Reply #6 Top
Good Luck Miss Edna. I imagine you can do great things with all that, but Stardock may or may not want to expose their source.

If I may, I would like to add one to your list. Map Script. Being able to affect how maps are made randomly.

Reply #7 Top

Thank you for all your replies.

Indeed Stardock will not want to expose the source code. What I would like actually is that they provided us ways to attach addin script code.
The question I put is, the game is wonderful, very nice, but it too much simple IMO.I would like this to be more complex.
For example, I don't like the fact that Industrial Production will do Social Projects or Military Projects. This is simply too abstract.
However ideas everybody have. I would like to have the tools to try different designs and comes with a fully tried design that could appeal to a more mature public.

Thank you and kisses from me.

Edna
Reply #8 Top
For example, I don't like the fact that Industrial Production will do Social Projects or Military Projects. This is simply too abstract.


This made me laugh. In all the older galciv games, it's very intuitive, numbers are obtained without visible logic, and some things like ion drive as a requirement of planetary invasion. I like this sort of system, it really makes you feel like you've mastered the game when you do a hundred obscure things and watch your empire become almighty.

However, so many people complain about this that Stardock have changed it, each patch losing some things of it's original wonderful weirdness. Of course I keep getting the patches, because they add so many cool things.

But sometimes I do long for the old, insane tech tree and style
Reply #9 Top

Thanks for your laughing kido,

I am not actually complaining, so I hope not being in the stats. I don't miss older galciv games.
Just loved this one so much in the perspective of a potential very good game.
Need the freedom to things my own way and see how AI reacts to it.
When I say too abstract I am not actually wondering to see the information cleary shown in the screen. I also like that stuff of doing a hundred of obscure things and watch the empire blow up.
What I am trying to hide is that I really really really wanted to have mining operations that produced minerals that I could transfer to colonies specialized in transforming it to spare parts that I could transfer to colonies specialized to manufacturing stuff.
Well... I am becoming too crazy with time.

Kisses from me...
Edna