Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Summer Movie Night - posted on 14th Jun 2018 at 7:07 AM
Replies: 2 (Who?), Viewed: 1697 times.
Lab Assistant
Original Poster
#1 Old 17th Mar 2017 at 2:34 AM Last edited by roBurky : 19th Mar 2017 at 12:19 AM.
Default Editing buffs through script modding
So, I'm getting into script modding. I've done the tutorial with the getting the town population example, and got that working. I'm now looking at actually making something.

I want to change the mood_type of every buff of a particular mood_type. Rather than do it through a lot of overrides, and needing to manually update for every new pack that comes out, I thought it would be more sensible to somehow do this with scripting.

I've been looking at this thread, and looking through the code of other mods. I'm gathering that injecting into 'load_data_into_class_instances' is the best way to go about this sort of thing? But I'm still not sure if the precise thing I want to do is possible - every other mod I've seen do edits is adding new interactions to things.

I realise posting about something like this here is a bit of a long shot. None of the modding veterans seem to post any more.
Lab Assistant
Original Poster
#2 Old 17th Mar 2017 at 10:16 PM
Ok, I've made progress in that I've gone through scumbumbo's inspector tutorial , and learned out how to look at the buff tuning in-game with that, and learn how it works. I can edit a buff's tuning now, which produces the same effect as editing the buff's XML.

So my next issue is that doing this doesn't include the effect of editing the buff's data file. So I get the buff's mood type changing behind the scenes, but the visible moodlet still has the colour and label of the old mood type.
I'm guessing I have to change something elsewhere to alter the data file's effects? Anyone know where to start looking? Or if this is impossible?
Test Subject
#3 Old 18th Mar 2017 at 3:13 AM
Sorry if this isn't helpful. I'm more of a Newbie XML modder with basic knowledge of game files so this may be something that edits more than you need but....

I saw on another post somewhere in the forums that the color (or the ID that indicates color) of a buff is located in the UI files somewhere. Find that file, you would have all the code needed. That said, from the sounds of that thread it might bork during an update and would most likely need manual updating after each new EP/SP/GP. I read this a few days ago and now can't find that thread anywhere, but I can't remember the title of it either so it's more likely that I'm just not finding based on that rather than the thread was deleted.

Someone more knowledgeable than me in script coding might have a simpler solution.
Back to top