#2523 closed enhancement (fixed)
Make skirmish entities more mod friendly
Reported by: | sanderd17 | Owned by: | Idanwin |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 17 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
Currently, to adapt the skirmish entities to a mod that simply adds a civ, you need to copy the skirmish entities to the mod, and adapt a line on each of them.
This breaks loading multiple mods, as they overwrite each others changes.
Instead, it would be better to define a mapping of skirmish replacements in the civ.json files, and let the skirmish replacement component get the info from there (through the player component).
Attachments (3)
Change History (11)
comment:1 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
by , 10 years ago
Attachment: | output.diff added |
---|
comment:2 by , 10 years ago
by , 10 years ago
Attachment: | output.2.diff added |
---|
comment:4 by , 10 years ago
Keywords: | patch review added |
---|
follow-up: 6 comment:5 by , 10 years ago
Looks very good. Just watch out for your indentation. We use one extra tab per indentation level. I also wonder if it's best to work with id's, instead of the template names (you can query the template name of yourself via the templateManager).
Maybe now keep the ids equal to the template names (so include _b for the basic soldiers, someone might want to make _a and _e templates),. That would make it easier to find, and if we ever need a distinction, it's ready.
comment:6 by , 10 years ago
Replying to sanderd17:
Looks very good. Just watch out for your indentation. We use one extra tab per indentation level. I also wonder if it's best to work with id's, instead of the template names (you can query the template name of yourself via the templateManager).
Maybe now keep the ids equal to the template names (so include _b for the basic soldiers, someone might want to make _a and _e templates),. That would make it easier to find, and if we ever need a distinction, it's ready.
I didn't know how to query the template name (or even whether it was possible) I concur, that's a much more desirable option. I'll change it today.
by , 10 years ago
Attachment: | output.3.diff added |
---|
comment:8 by , 10 years ago
Keywords: | simple review removed |
---|
I uploaded a diff, if someone could have a look at it.