• Welcome to SC4 Devotion Forum Archives.

Script - Batch change lot settings

Started by dyas, May 02, 2013, 07:00:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dyas

Hi, I wanted to make a realistic city, but worry less about my props costing me money. Is it possible to batch remove good and bad effects from a group of lots as well as make them cost 0? I want to be able to use them without worry of money, but I don't want to be getting good or bad effects. Basically I just want them to look shiny. I did one manually, but this would be a large work to convert them all? Thanks if some scripter can help me out.

whatevermind


dyas

#2
Thanks, what if they are a bunch of lots, and not a dat though? I'm still looking at it though as this seems the right direction.

Edit:
So. I used http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=26 to put all the plugins in question into a compressed .dat file. Than I used the find and replace as suggested. I say this in case anyone else asks this question.

Edit2:
Well I combined them all. Batched changed the info, and than SC4 kept crashing. I deleted my .dat and it worked fine.

whatevermind

I think datpacking the lots makes sense, should make it easier to work with. That said, I've never actually tried using the procedures in that other thread, so I can't say much for how well they work or what bugs might occur. Unfortunately, there's a lot of reasons SC4 can crash, and there's a lot of ways a big file can get corrupted, so I don't have much advice other than to just keep trying different arrangements and see if you can pinpoint the problem.

dyas

Ok, when you data pack a file, there were 3 files with each lot. Do I put all 3 in? does it change the dependencies listed in each file?

Magneto

Yes, when you datpack a file, always keep the related sc4model, sc4lot & desc files together.

dyas

#6
Ok, I got a data pack file going. I tried to batch change all the budget cost to 0 to start with. It changes all the ones it finds, but it seems that some link to a parent cohert that still has a cost? :( I'm making progress, and using the exempler search and mass edit thing, but not working yet.
Here are pictures so maybe that will help:




It won't let me set the second one. And I think that one is the one that is in game. So the cost never changed?

whatevermind

To edit values inherited from parent cohorts you'll have to find the cohort in question and edit the property there. If any of them are default game cohorts, you'll find those in the sc1 dat, and you can make a copy of them and then edit the copy and add it to your patch.

dyas

Can I just change the cohort? I don't want to per say change a real SC4 file. I bet they are linked to the grass field plot though.

whatevermind

That should work too. I also think that if the same property is in both the cohort and the exemplar, the value in the exemplar will override the one in the cohort, but I could be wrong. That's something you should be able to test in game.