 |
|
gigapimp3001
|
|
I`m adding a few units to the Default Apolyton mod, notably in the aerial department with an Attack helicopter and a combat UAV to spice up the otherwise lack lusture aerial units.
Anyway as far as i know I have done everything I should have done with regards sprites, icons, newsprite.txt and uniticon.txt.
Now what I considered the easy part , APOL_units.txt is actually the problem.
When i spark up CTP it crashes telling me "Expected String ID 4242 "etc then goes through alist of fields that it thinks should be there and isn't (such as attack points, shield cost and so forth)
I beg to differ but arguing with a computer gets you now-where.
Can anyone point me in the right direction?
|
|
|  |
 |
|
gigapimp3001
|
|
I tried going over the code with a fine toothed code and i still can`t see anything wrong with it. Mind you I`m not a programmer, I don`t have the patience for it so a more trained eye might find something..
Attachment: apol_units.txt
This has been downloaded 2 time(s).
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:22
|
|
It's line number 4242: "Description DESCRIPTION_UNIT_COMBAT_UAV" and line number 4298 "Description DESCRIPTION_UNIT_ATTACK_HELICOPTER". IIRC, these descriptions are not actually used by the game but have to be some existing description, e.g. DESCRIPTION_UNIT_WARRIOR.
BTW, what's a COMBAT_UAV and what sprite are you using?
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:22
|
|
TGA's are pictures and you can view them with Microsoft Picture It! Express 2000. (That's the program on my computer that does it. There may be better ones.)
As it happens, I've put the Attack Helicopter unit in the mod I'm working on. Here's the data I've used with some (hopefully) explanatory comments.
code: from uniticon.txt
ICON_UNIT_ATTACK_HELICOPTER {
FirstFrame "UPUP097L.TGA"
// a 38k picture of the unit, must be in ...\cpt2_data\default\graphics\pictures
Movie "NULL" // Wonders get movies here
Gameplay "UNIT_ATTACK_HELICOPTER_GAMEPLAY"
// the Great Library entry for UNIT_ATTACK_HELICOPTER_GAMEPLAY, must be in Great_Library.txt
Historical "UNIT_ATTACK_HELICOPTER_HISTORICAL" // likewise
Prereq "UNIT_ATTACK_HELICOPTER_PREREQ" // likewise
Vari "UNIT_ATTACK_HELICOPTER_STATISTICS" // likewise
Icon "UPUP097A.TGA"
// a 2k picture of the unit, must be in ... \cpt2_data \default \graphics \pictures
LargeIcon "UPUP097L.TGA"
// a 38k picture of the unit, must be in ...\cpt2_data\default\graphics\pictures
SmallIcon "UPUP097B.TGA"
// a 1k picture of the unit, must be in ...\cpt2_data\default\graphics\pictures
StatText "UNIT_ATTACK_HELICOPTER_SUMMARY"
// the Great Library entry for UNIT_ATTACK_HELICOPTER_SUMMARY, must be in Great_Library.txt
}
The FirstFrame picture can be a different picture from the LargeIcon picture.
BTW, you should use 97 for the ATTACK_HELICOPTER's number: the TGA's are as above and the sprite will be GU097.SPR
The number 98 was reserved for Harlan's Missile Cruiser, but I think Caranorn's about to give us a proper animated version of this unit. 
So, here's the Copter tga's you need.
Attachment: coptertgas.zip
This has been downloaded 1 time(s).
Last edited by Peter Triggs on 20-09-2002 at 02:34
|
|
|  |
 |
|
Caranorn
|
 |
Luxembourg, Europe
Mar 2000 time: 06:22
|
|
1) wrong format of the tga shoudl not crash the game. The wrong bit type should just end up giving a distorted image, at least that's what I experienced.
2)As Pedrunn said, get those names exactly right, if the game can't find the image it's looking for it will shut down.
3) I'm not so sure about picture size, that definitelly won't crash the game. In some cases the wrong tga size means icons don't fit into their window and overlap others, in other cases it seems to be scaled and just looks ugly. I still believe there might be room for a 4th size tga file in the game (96x72) as one of the game icons is that size (none of the official files though). I haven't had time to test this though.
In short, get right right kind of targa into the right slot. L (120x90) for the great library and large icon. A (32x24) for the normal icon. B (24x18) for the small icon. A different size (96x72) might work for the large icon, but that's as yet untested, it would also have to be labelled consistantly (use the L label for the large icon and use a different one, G maybe for the GreatLibrary).
If you add or modify a unit also always remember to check whether you modified all files concerned (you can create DESCRIPTION_UNIT_COMBAT_UAV, you'll just have to tell the game in the correct file what that is). I haven't done any of this since my return to CTP2, but I'm sure most explanatory material from the CTP days still exists on Apolyton and is largely applicable to CTP2.
Seriously modifying the game can be tough at times, but once you get the hang of it you'll be able to isolate your errors quick (you'll still make mistakes but al least you will know what you did wrong
Marc aka Caran...
P.S.: Concerning the Missile Cruiser, that Civ3 flic really represents a fast patrol craft (missile). Still up to anyone how they wish to use the sprites in a mod once they are converted. For now that particular sprite is on backburner though.
|
|
|  |
 |
|
J Bytheway
|
 |
England
Jul 2001 time: 05:22
|
|
quote: Originally posted by Caranorn
1) wrong format of the tga shoudl not crash the game. The wrong bit type should just end up giving a distorted image, at least that's what I experienced. |
I haven't tried in CTP2, but in CTP I found that using the wrong compression (ie. compressed when it should be uncompressed or vice versa - I can never remember which it should be...) caused corrupted graphics, but using the wrong bit depth caused crashes exactly as described.
Which picture is it that appears on the cheat screen? Is it the SmallIcon?
Last edited by J Bytheway on 20-09-2002 at 17:39
|
|
|  |
 |
|
Caranorn
|
 |
Luxembourg, Europe
Mar 2000 time: 06:22
|
|
Okay, I decided to test my 4 different icon sizes theory. I think I was rightand wonder why Activision just uses 3 files and accordingly has to scale 1 file down within the game.
The Cheat uses icon A which is normal size (32x24) (forgot to check the uniticon file again to see what their exact label is there).
I created the following picture through screenshots. I used 4 tga files instead of the usual 3. I think it's self explanatory. File L used 96x72, G 160x120, A 36x24 and B 24x18. The letters within the images are taken from the screenshot (to be safe I added the letter to each targa).
I also inadvertently (made a mistake with the files at first tested whether the game crashes if the wrong bit setting is used. It doesn't at least not for icons A, B and L.
Marc aka Caran...
P.S.: All sprites I create in future will have 4 targas and explanations how to use them.
Attachment: targasizes.jpg
This has been downloaded 59 time(s).
Last edited by Caranorn on 20-09-2002 at 18:35
|
|
|  |
 |
|
Pedrunn
|
 |
of Natal, Brazil
Jul 2001 time: 02:22
|
|
quote:
1) wrong format of the tga shoudl not crash the game. The wrong bit type should just end up giving a distorted image, at least that's what I experienced. | But i have once used for small icon larger files from CTP (cant remember the size but it is the smallest CTP size). it didnt crashed the game but they werent re-scaled. So in the army manager one targa was invading th others ones one space
Last edited by Pedrunn on 20-09-2002 at 22:28
|
|
|  |
 |
|
gigapimp3001
|
|
Okay I`ve built my first brand spanking new Attack Hellicopter was moving to one of my cities with an air carrier and halfway through the games did its rude crashing without explaination thing.
Now if I had missed out something the the text then my unit would not have ben built without the game crashing the moment it the sprite came onto the screen. Why of all things should it crash in the middle of a move?
|
|
|  |
 |
|
gigapimp3001
|
|
actually I tried again later and thpough the game did crash again it was with another new unit and the helicopter worked out fine.
I have a horrible feeling I might be blowing some memory or cpu limit or perhaps its just me being paranoid.
Anyway I'll attach the uniticon file for your amusement!
Attachment: apol_uniticon.txt
This has been downloaded 1 time(s).
|
|
|  |
All times are GMT. The time now is 05:22. Apolyton Time is 00:22. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|