Create units

PC/MAC : Turn based Empire building in the ancient Greek World.

Moderator: Slitherine Core

Post Reply
Spearton
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 7
Joined: Wed Oct 20, 2010 1:12 pm

Create units

Post by Spearton »

Ave.
If somebody asked this before me, I'm sorry. I did not see anything helpful in the forum, but I swear that I searched a lot.
However, that's my question.

I tried to create a new unit, a greek infantry leader with Leonida's skin. I added it on the bottom of the file "Squads.txt", setting the unit ID "119". I also modified the file "localisation.txt". But, when I try to recruit the unit, the game simply crashes to desktop.

Thanks for helping and sorry for my bad english.

Edit: problem almost solved. There was an error in localisation.txt
Now, it doesn't crash anymore. But all description are missing, and the unit name is changed in "takabara are light... etc". I think that the problem is still in localisation.txt, but I don't know how can I solve it.
Thanks everyone again.
pipfromslitherine
Site Admin
Site Admin
Posts: 9863
Joined: Wed Mar 23, 2005 10:35 pm

Re: Create units

Post by pipfromslitherine »

I'm not sure it is possible to add new strings to the localisation unless there is already a blank space - the localisation file is linked to the compiled code. It's s system we dropped soon after for that very reason...

Cheers

Pip
follow me on Twitter here
Spearton
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 7
Joined: Wed Oct 20, 2010 1:12 pm

Re: Create units

Post by Spearton »

No, there was not empty spaces.
That's what's in the file (in red) and what I added(in green):

IDS_SQUADNAME97,"97",
IDS_SQUADNAME98,"98",
IDS_SQUADNAME99,"99",

IDS_SQUADNAME119,"Generale Spartano",
IDS_SQUADTEXTSTART,"x",
IDS_SQUADTEXT0,"I Contadini sono Fanti Leggeri, costano un'unità di popolazione quando vengono reclutati e, se congedati vicino a una città, si sommano alla sua popolazione; vengono agevolmente sconfitti da qualsiasi unità addestrata",


then, scrolling down:

IDS_SQUADTEXT97,"97",
IDS_SQUADTEXT98,"98",
IDS_SQUADTEXT99,"99",

IDS_SQUADTEXT119,"Il Generale Spartano è un Comandante. Conduce gli uomini in battaglia e fornisce un bonus di combattimento aalle truppe vicine.",
IDS_SQUADTEXTEND,"x",
IDS_SQUADBATRES0,"Contadini£",
IDS_SQUADBATRES1,"Contadini£",
IDS_SQUADBATRES2,"Lan. giavellotto Psiloi",
IDS_SQUADTEXTEND,"x",
IDS_SQUADBATRES0,"Contadini£",
IDS_SQUADBATRES1,"Contadini£",
IDS_SQUADBATRES2,"Lan. giavellotto Psiloi",


and down again:

IDS_SQUADBATRES98,"98",
IDS_SQUADBATRES99,"99",

IDS_SQUADBATRES119,"Generale Spartano",

and:

IDS_SQUADBATTLEDES98,"98",
IDS_SQUADBATTLEDES99,"99",

IDS_SQUADBATTLEDES119,"I Generali sono dei Condottieri. Guidano i tuoi eserciti in battaglia, fornendo un bonus di morale a tutti i loro uomini e possono controllare di persona le truppe, dando un vantaggio locale in combattimento.",
IDS_TERRAIN1,"Prateria",
IDS_TERRAIN2,"Montagna",

It's in italian, but that's what I wrote for name and descriptions.
What's wrong?
In the squads.txt file I called my unit "Generale Spartano", that way:


// **** General Info ******** Generale Spartano
ID 119
Name Generale Spartano
Type Hero
IconID Leonidas
Rating 100

etc.

So, since there are no white gaps, there are some problems? Oh. So, if I want to add a new unit, I have to change the entire file? Ore more files? Or the game itself? I understand.
Thanks for answer, anyway. :D
pipfromslitherine
Site Admin
Site Admin
Posts: 9863
Joined: Wed Mar 23, 2005 10:35 pm

Re: Create units

Post by pipfromslitherine »

The key issue is that you CANNOT add "new" strings - e.g. strings which are not already in the file. Your solution is to use one of the existing strings which have temporary information in them (e.g. just "99" or "x") rather than trying to create a new entry.

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “Spartan & Gates of Troy”