Create New Ships?

Hi there, I'm trying to create new ships, unfortunately I'm getting mini dumps. Here the steps I took...

1) I copied "CAPITALSHIP_TECHBATTLESHIP.entity" to "CAPITALSHIP_TECHBATTLECRUISER.entity"
2) In my new battlecruiser file, I changed the NameStringID and DescriptionStringID
3) add the new strings to string\english.str
4) edit playertech.entity changed the "capitalShipInfo" count from 5 to 6
and add entityDefName "CAPITALSHIP_TECHBATTLECRUISER"
5) try in game

Basically after I build the capitalship factory, I select capitalship icon, and then it core dumps. Now if I remove one of the other ships, it will show up, but it still core dumps. I'm assuming my problem is dealing with my new entity file. Anyone got ideas what else needs to be changed to just clone of another ship?



12,614 views 24 replies
Reply #1 Top
did you take the capitalshipinfo back to 5? it seems the game will not allow more than that for cap ship types. Hmm, did you try making it act like a frigate instead? Just to see if theres a code limit or something.

Reply #2 Top
did you take the capitalshipinfo back to 5? it seems the game will not allow more than that for cap ship types.

End of quote


Hmm, that would be very unfortunate if we can't add more types of capital ships to a race.

To the original poster: I haven't tried this myself yet, but did you also copy and rename a mesh file for the ship to match the name of the new entity file? You may also need to copy and rename texture files. Not having any defined graphics/model for the ship could be causing your dump.

Reply #3 Top
I tried to recreate the OP's situation, but looks like he did something else, because I can perform those steps without a crash.

However, the new ship does not appear on the build menu. I can see no reason for that other than an UI problem. I have found, in english.str, the following lines:

StringInfo
ID "IDS_UIMAPPINGNAME_BUILDCAPITALSHIP0"
Value "Build Capital Ship - 0"
StringInfo
ID "IDS_UIMAPPINGNAME_BUILDCAPITALSHIP1"
Value "Build Capital Ship - 1"
StringInfo
ID "IDS_UIMAPPINGNAME_BUILDCAPITALSHIP2"
Value "Build Capital Ship - 2"
StringInfo
ID "IDS_UIMAPPINGNAME_BUILDCAPITALSHIP3"
Value "Build Capital Ship - 3"
StringInfo
ID "IDS_UIMAPPINGNAME_BUILDCAPITALSHIP4"
Value "Build Capital Ship - 4"
StringInfo
ID "IDS_UIMAPPINGNAME_CANCELBUILDCAPITALSHIP0"
Value "Cancel Build Capital Ship - 0"
StringInfo
ID "IDS_UIMAPPINGNAME_CANCELBUILDCAPITALSHIP1"
Value "Cancel Build Capital Ship - 1"
StringInfo
ID "IDS_UIMAPPINGNAME_CANCELBUILDCAPITALSHIP2"
Value "Cancel Build Capital Ship - 2"
StringInfo
ID "IDS_UIMAPPINGNAME_CANCELBUILDCAPITALSHIP3"
Value "Cancel Build Capital Ship - 3"
StringInfo
ID "IDS_UIMAPPINGNAME_CANCELBUILDCAPITALSHIP4"
Value "Cancel Build Capital Ship - 4"

Looks like some sort of mapping functions for the buttons? There are five of them, just like capital ships. However, simply adding a sixth entry does nothing. I thought, maybe the new ship button is off screen or something, or overlayed with one of the existing ones. But I can't find any reference to button positioning. What makes frigates "spill over" to the second row? Have I missed something?
Anyway, I am officialy stumped. If anyone solves this, do let us know.
Reply #4 Top
Update: I removed one of the existing capital entries in english.str and now my new capital shows up in the last spot, buildable and everything, no crashes. So it is obviously a UI problem.

Which is a bit daft... not having the buttons automatically spill over to the second row. I'll check out frigates, maybe the answer is there.
Reply #5 Top
wot about HUDIcon-Ship.brushes file ?

TXT
onlyLoadOnDemand FALSE
brushCount 146
brush
name "HUDICON_CAPITALSHIP_TECHCOLONY"
content "States"
Disabled
fileName "Unit_Hud_Disabled"
pixelBox [ 6 , 224 , 47 , 33 ]
Pressed
fileName "Unit_Hud_Pressed"
pixelBox [ 6 , 224 , 47 , 33 ]
CursorOver
fileName "Unit_Hud_CursorOver"
pixelBox [ 6 , 224 , 47 , 33 ]
Focused
fileName "Unit_Hud_Normal"
pixelBox [ 6 , 224 , 47 , 33 ]
Normal
fileName "Unit_Hud_Normal"
pixelBox [ 6 , 224 , 47 , 33 ]
brush
name "HUDICON_CAPITALSHIP_TECHCARRIER"
content "States"
Disabled
fileName "Unit_Hud_Disabled"
pixelBox [ 104 , 224 , 47 , 33 ]
Pressed
fileName "Unit_Hud_Pressed"
pixelBox [ 104 , 224 , 47 , 33 ]
CursorOver
fileName "Unit_Hud_CursorOver"
pixelBox [ 104 , 224 , 47 , 33 ]
Focused
fileName "Unit_Hud_Normal"
pixelBox [ 104 , 224 , 47 , 33 ]
Normal
fileName "Unit_Hud_Normal"
pixelBox [ 104 , 224 , 47 , 33 ]

;o might that be it
Reply #6 Top
Hi guys, some updates to your question.

did you take the capitalshipinfo back to 5? it seems the game will not allow more than that for cap ship types.
End of quote


Yeah, I did, unfortunately no luck for me =(.


To the original poster: I haven't tried this myself yet, but did you also copy and rename a mesh file for the ship to match the name of the new entity file? You may also need to copy and rename texture files. Not having any defined graphics/model for the ship could be causing your dump.
End of quote


Actually the reason for my multiple dumps was I use my new strings from english.str, I can use and modify current strings without any issues, but not newly inputed one. I figured out that order capitalships strings MUST be in the same order as in PlayerTech.entity, once I moved my BATTLECRUISER ID and DESCRIPTION from the bottom of the file to the rest of the IDS_CAPITALSHIP_TECH* strings, it works and no more dumping!


Update: I removed one of the existing capital entries in english.str and now my new capital shows up in the last spot, buildable and everything, no crashes. So it is obviously a UI problem.

Which is a bit daft... not having the buttons automatically spill over to the second row. I'll check out frigates, maybe the answer is there.
End of quote


Yeah, I trying to figure out this issue with no luck this morning. I got around this issue by putting my new ship in the 5th slot. I guess I got to work now ;p , at least my new battlecruiser works like a beaut now!
Reply #7 Top
I tried copying the hudicon coords for the colony frigate, since I figured it was just a general screen area it was referencing. Sadly no luck.
Reply #8 Top
ok what about making a new type of factory for your units? is there a way to say, add in a new class? maybe a BattleCruiser class, then the new factory can list your new ships.

entityType "CapitalShip" seems to be the critical thing here. If theres a way to create a new entitytype, maybe we can then add in new models but i think the UI still only allows 7 units i think.

ill experiment abit with this too.
Reply #9 Top
I ran into the same issue with cap ship slots, it looks to be UI related, I sent this concern to IC to see what they could tell us about it.

I'm going to be making an excel sheet that handles the str file import and export, almost all of the minidumps I've had are due to stupid issues in this file.
Reply #11 Top
The problem isn't in adding new ships, but in adding new buttons for those ships to be built. So it is primarily an UI problem and it looks like we either don't have the required files to modify that, or we don't know what to change. I know some modders here tweaked the UI already to look different, maybe someone can enlighten the rest of us? :)

Oh and btw - the brushes files are simply reference lists for the game to know which section of the large texture files to pick for various UI elements. If something needs to be tweaked, it must be in one of the .window files. I'll check it out later, see if I can make some headway with this.
Reply #12 Top
well I am not that sure about the UI because you don't have that problem when we are adding more then 5 frigate or cruiser. Seems like something is messed up with the capship
Reply #13 Top
TXT
onlyLoadOnDemand FALSE
brushCount 146
brush
name "HUDICON_CAPITALSHIP_TECHCOLONY"
content "States"
Disabled
fileName "Unit_Hud_Disabled"
pixelBox [ 6 , 224 , 47 , 33 ]
Pressed
fileName "Unit_Hud_Pressed"
pixelBox [ 6 , 224 , 47 , 33 ]
CursorOver
fileName "Unit_Hud_CursorOver"
pixelBox [ 6 , 224 , 47 , 33 ]
Focused
fileName "Unit_Hud_Normal"
pixelBox [ 6 , 224 , 47 , 33 ]
Normal
fileName "Unit_Hud_Normal"
pixelBox [ 6 , 224 , 47 , 33 ]
brush
name "HUDICON_CAPITALSHIP_TECHCARRIER"
content "States"
Disabled
fileName "Unit_Hud_Disabled"
pixelBox [ 104 , 224 , 47 , 33 ]
Pressed
fileName "Unit_Hud_Pressed"
pixelBox [ 104 , 224 , 47 , 33 ]
CursorOver
fileName "Unit_Hud_CursorOver"
pixelBox [ 104 , 224 , 47 , 33 ]
Focused
fileName "Unit_Hud_Normal"
pixelBox [ 104 , 224 , 47 , 33 ]
Normal
fileName "Unit_Hud_Normal"
pixelBox [ 104 , 224 , 47 , 33 ]


These files are not the position in the interface, trust me i found out the hard way, they are the coding of the picture icons. The pixel box through me off too, i realized it when my interceptor squads i created failed to work (due to a seperate issue) but when i got them to work the mini icon in the empire tree and even in the build stuff showed up as a dunov battlecruiser. The the postion in the interface has to be something else.
Reply #14 Top
The pixelbox coordinates are the location in the button textures where the button image is at. Same for any interface element that is 'sliced' out of a larger image.
Reply #15 Top
thats what i thought, any chance on revealing how to add in new ships, fighters without overwriting current ships?
Reply #16 Top
Mansh00ter is right. It isnt pixelbox we need to look at its area references. I was looking at those .window files myself. That userinputgridwindow reference in bottombar.window was interesting. But it seems like we are still missing something, maybe we are unable to add new ships in addition to the current ones.

Btw, the UI was modified by changing values in topbar.window and bottombar.window

Has anyone tried to add a new frigate or cruiser? It might just be hardcoded for the capships.

Reply #17 Top
you have to change the stringscount as well, if you didn't do that already

might explain why adding new ones doesn't work
Reply #18 Top
Hey Carbon i liked that JPI mod you made, it rocks.

What do you mean by adding a new stringcount?

Reply #19 Top
i was able to add other ship type without any modification to string as well as being able to put my own cap ship aslong as they are the first 5 line in the player entity
Reply #20 Top

Hey Carbon i liked that JPI mod you made, it rocks.

What do you mean by adding a new stringcount?
End of quote


At the top of english.str there is a number that counts the number of total strings. If that count is off, any "new string" added will result in a dump. Don't ask me why it does this. So just make sure you add to that count at the top whenever you add a string.
Reply #21 Top
Yeah i dont think it has anything to do with the string file, thats just for giving it its UI name and decription. I think the mechanism for actually adding a 6th capitalship might be hardcoded in.

I'll fool around a bit more, lemme see if i can give Tec all the capital ships in the game. No string editing needed for that.



Reply #22 Top
I would think that Ironclad would have the foresight to not hardcode in the limit on the number of ships ingame. There is probably a file that we dont have or a particular one that needs to be edited.
Reply #23 Top
Well i just gave Tec an additional capship from another race and still no dice.

I can have 5 of any capitalship in the game, but not 6.
Reply #24 Top
Im ganna have to agree with Shadow here, its most likely a file that we dont have yet or its located in a file that we havent found yet, both are big possibilities