Probably a dumb question - but how do you go about *deleting* units, buildings, etc.?

Andrew_Jay

Prince
Joined
Aug 4, 2002
Messages
438
Hi, I've finally gotten around to seeing what else I can do with my Sengoku-Jidai scenario. Mainly, I've decided to give modding the XML files a shot, but it's really not working at all.

I've tried using the existing Firaxis Mods as a guide, but the main problem is when I try to remove stuff (because I don't need tanks and factories!). However, where the official scenarios/mods seem quite lean, I find myself having to drag every single XML file into my mod.

I created a tech tree and removed all of the existing techs. Of course, everything relying on those techs also had to be changed - prerequisites set to "NONE" as a temporary measure for some things, units and buildings largely deleted.

So far I've gone through a lot of XML files deleting every trace of units/buildings/techs I don't want. But it seems like I'm just running around in circles.

For example, I delete the tech requirement for a unit - then delete the unit . . . then I have to delete the unit's entry in the ClassInfos.XML . . . then I get an error because the Goody file refers to the unit, so I delete it there . . . and then of course the Handicap files has to be amended as well!

I'm just wondering If I'm doing something fundamentally wrong - and is there some central source where if I can delete things at one location and leave most other files intact?

any help would be really appreciated - and I'll see if I can find somewhere I can host the mess I've made incase anyone is interested.
 
Andrew_Jay said:
Hi, I've finally gotten around to seeing what else I can do with my Sengoku-Jidai scenario. Mainly, I've decided to give modding the XML files a shot, but it's really not working at all.

I've tried using the existing Firaxis Mods as a guide, but the main problem is when I try to remove stuff (because I don't need tanks and factories!). However, where the official scenarios/mods seem quite lean, I find myself having to drag every single XML file into my mod.

I created a tech tree and removed all of the existing techs. Of course, everything relying on those techs also had to be changed - prerequisites set to "NONE" as a temporary measure for some things, units and buildings largely deleted.

So far I've gone through a lot of XML files deleting every trace of units/buildings/techs I don't want. But it seems like I'm just running around in circles.

For example, I delete the tech requirement for a unit - then delete the unit . . . then I have to delete the unit's entry in the ClassInfos.XML . . . then I get an error because the Goody file refers to the unit, so I delete it there . . . and then of course the Handicap files has to be amended as well!

I'm just wondering If I'm doing something fundamentally wrong - and is there some central source where if I can delete things at one location and leave most other files intact?

any help would be really appreciated - and I'll see if I can find somewhere I can host the mess I've made incase anyone is interested.

Nope, there is no easy way. If you delete an object you need to modify all the files that reference that object, which is a pain.

Alternativly you could just disable the objects you dont want (set units to -1 cost, make techs require the future tech, etc).
 
Ah, -1 cost, that helps a little.

If I have a custom tech tree, how do I put something like a future tech in such that A: it doesn't show up and B: it can't be researched?

I'm going to go back and look at how the Firaxis scenarios do it.
 
Andrew_Jay said:
Ah, -1 cost, that helps a little.

If I have a custom tech tree, how do I put something like a future tech in such that A: it doesn't show up and B: it can't be researched?

I'm going to go back and look at how the Firaxis scenarios do it.

To make a tech so it doesn't show up put it at -1 on the Y coordinate. To make it so it can't be researched set bDisable to 1.
 
yeah it's sux
if anyone knows better method let me know
this xml stinks a lot - if i wanted to correct just one file (just one small thing ;) finally i was workin on 15 opened files with long way to finish just one small thing and perspective of opening another 15 files)

it's good to begin work in saturday morning and finish it @ night - everything should be cleaned in this amount of time :)
 
Nope, there is no easy way. If you delete an object you need to modify all the files that reference that object, which is a pain.

Yeah, that's true!

@Andrew_Jay: If you delete units and buildings, check the entry for the Barbarians in the civilizationinfos.xml. A lot off units and buildings are forbidden for the barbs. If you remove one of these objects, they must be also removed there.
 
Thanks a lot for the help - I'm actually making a lot of progress now. Basically with a few hours of work today I'm farther than I was after three days of work earlier the week (especially seeing how I can actually launch the scenario rather than just taking note of all of the prompts to fix errors in the XML!).

Two quick questions about the tech tree.

First, I have all of the techs I don't need disabled and set to -1,-1 x,y co-ordinates. However, the tech tree menu is still as large as it was before (i.e., I can still scroll through all of the nothingness on the right). My tech tree fits nicely in one screen, and would like to get rid of that scroll bar if at all possible.

Secondly, I have a lot of worker actions that I set to a PreReq of "None" showing up under one of my techs. Any ideas there? I think it might be because I set that particular tech as the tech for clearing trees and jungles, but don't really know.

Again, thanks a lot. It looks like I'll finally get this thing finished!
 
Everyone's help was awesome and my scenario is just about complete (and I'm pretty excited about it, I think it's going to be really great).

I just have one more question that's been frustrating me with the technologies.

Basically, a lot of things like trade over the ocean, being able to trade gold, vassalage/capitulation, etc. are tied to a specific tech where they have to be activited (or not activiated) with a simple 1 or 0.

Now, a lot of these things I want to have available from the start, so I've just piled them on a tech I'm not using (Mysticism). However, no matter what I try I just can't get the players to start with that tech. I have tried:

-adding the tech to each player in the worldbuilder
-adding the tech to each player by editing the save file's text
-adding the tech to the FreeTechs and AIFreeTechs in handicaps
-making the tech the "Starting Tech" for Japan.

Yet, no matter what, it never works - the game starts and I am still unable to work sea tiles, trade gold, etc. At best, I can get the tech to appear as something I can research but that's it - and despite giving it away for free everywhich way I can think of.

And ideas?
 
Back
Top Bottom