General Category > Starward Rogue Mods & Modding

Override Existing XML?

(1/2) > >>

I'd like to override some existing entities, and I'd like to know what the best way of doing it is, preferably without breaking future updates.  Specifically, I'm changing what floor a lot of the items can spawn on - no other characteristics of the items, which is why I'd prefer to override existing.  (I've made some other local updates, but most of them create new items, incredibilities, etc, so they sit just fine side-by-side inside Dauthi_whatever.xml).

So far, I've considered:

* Modifying the existing files: I think this breaks updates, or, maybe just overwrites the mods on update.  Either is not great.
* Creating a set of diffs: Better, I can apply them after an update.  Testing that had some errors, but mostly worked.
* Just using zDauthi_whatever.xml: Works, game complains about duplicate entities.  Makes sense to me, there are duplicate entities.  I'd still rather not have those warnings, so that I can still see serious errors.
* Using xslt, XML::Merge, (something programmatically): Probably the best option if I don't have anything else.  But I'm lazy, so I thought I'd ask, first.
Is there a simpler option I'm missing?


* If you change a file, when your game is updated, if it is check for validity, it will be over-written.
* If you add a copy of an item (copy being defined by entity name), whichever is read in first, is the version that is kept (files are read in, alphabetically, so just append an 'a' in the file that contains what you are changing). However, it will also pop an error warning that there are multiple versions of an entity.
* Save failures happen whenever an entity is removed from current files, but is present in your save. For example, when I changed the InvaderBoss to Invader, that broke saves. Switching the entity name back to InvaderBoss or making a copy of and naming it InvaderBoss would have fixed that.
* diff method would work. You'd have to parse xml or ensure that the lines match exactly.
* duplicate entries. Yep. See first.
* not familiar enough with xlt.
I really don't worry about the duplicate entry messages, so I just slap my own file in and go from there. It depends on how widely you want to release it, what you want to change, and how much you are bothered by warning messages.

Side note, what changes were you thinking?

Yeah, I noted that about entities being removed.  First mod I tried ended up breaking my main save.  Totally makes sense, though.

Normal diff kinda-sorta works, but not well enough for me to rely on.  An XML merge would work better.  Lots of options there.  I might just create a "mods" directory and merge from there, much like Skyrim or its ilk.  Thankfully, there's no binary cooked stuff.  This game is really, really modder-friendly, and pretty well documented, too.

The duplicate entry messages mostly only bother me because I spend all day doing code review, so I'm somewhat OCD about warnings.

For this in particular, I'm just working on allowing most of the items to be spawned on a later floor, playing with do_not_seed_if_x_floors_down.  I've been playing with hulls and making their perks more unique-per-hull, which could have used this, but didn't require it.  Next up is going to be to try to make my own enemy ship: something that has regenerating shields (or high HP, whichever) that strongly pulls player bullets towards itself.  Try to keep it next to other enemies (Your shots hit it instead of them.  I figure this is just what a blaze cannon needs: a way to ensure you can't priority target it.)


--- Quote from: TheDauthi on June 06, 2016, 10:55:41 pm ---Your shots hit it instead of them.  I figure this is just what a blaze cannon needs: a way to ensure you can't priority target it.

--- End quote ---

I just.... what.

You're the first to suggest making the Blaze Cannons MORE dangerous and/or annoying.

Should be careful about giving me ideas like that...

I already intend on adding a new variant of those.  Inferno Cannons.  That should be entertaining.

Look forward to it.

I think the shield has interesting interactions with a lot of the larger enemies, making them more dangerous without changing their behavior much.  It works better than my first idea: a charger that dealt no damage, but rushed you and repelled your shots.  Make it hard to hit anything else.  Spawn it in groups (don't know how to do that one yet), add some knockback, call it a day.  Playing with repel mechanics on the player made me think it wouldn't work right: too many of the shots wouldn't hit it if it's not right on top of you, and if it's right on top of you, they all would hit.


[0] Message Index

[#] Next page

Go to full version