Discussion about racemods, a problem and solutions

Right, this is a rather complex issue so I want to hear modder's opinions before I go down any one path.

Just so we're clear: allegiance refers to the choice of Kingdom/Empire. Race refers to to the specific raceclassification (standard is Men or Fallen, but unique values are possible). Faction refers to a specific team, for example Tarth.

 

Basic problem: I want to replace the standard buildings for a (new) race. Let's say I want to replace the basic Kingdom workshop with a new tile. I want only my improvement to appear in the building list, and I want no other workshop to appear in the building list.

More problems: The only prerequisite for a kingdom workshop is for the player to play the allegiance Kingdom. Everyone who plays Kingdom automatically has access to the same tile. So, to remove it, I have to change the workshop for all players, even those not using my faction.

 

 


 

Solution A:

Add a prerequisite to the original building to require the race Men. A new faction can use a new race (raceclassification), and thus avoid getting any old buildings.

Problem: All custom racemods that have a non-standard raceclassification are hurt. Let's say one mod wants to use the standard workshop and the arcane laboratory, but wants to use their own merchant and watchtower. The mod would have to include the improvementtypes for all four types, instead of just two. Because ANOTHER modder has declared that the original workshop and the arcane laboratory should belong to only one race.

Doesn't sound too bad? Then consider, that each racemod must contain every improvement, whether changed or not, that is buildable without researching any technology. This includes the basic 5 buildings, and 20-21 resource improvements.

Still doesn't sound too bad? Think it's a copy and paste job? Then also remember, that each racemod would have to update each improvement type individually whenever a patch is released.

 


 

Solution B:

Keep the old buildings, just add your new buildings and make the player choose between vanilla version and new version when building.

Problem: Resource tiles only allow for one building to be used. This means we can't use our own designs on resourcetiles. Furthermore, the AI would build cities that break the theme and thus the point of the racemod.

 


 

Solution C:

Build a custom Techtree with reduntant techs (one for each improvementtype). The raceconfig then uses <KnownStartingTech> to teach the race only the buildings that the racemod doesn't want to change.

Problem: All redundant techs would have to be added to the vanilla factions, and this would break all custom factions designed by players in the faction editor [a solution would be to include a simple ability worth 0 points that all players would have to include). Since this involves editing a techtree, the standard techtrees are effectively "spoken for", and no other modder can modify the techtrees. This solution also breaks the campaign.

 


 

Solution D:

All the modders doing racemods agree that we do NOT use custom tiles for resource improvements. We stick with the vanilla resource improvements.

Then we use Solution A for the remaining 5 buildings. So each racemod would have to include 5 buildings only, whether altered or not.

 


 

Solution E:

Almost like solution A: We add a prerequisite for race to all vanilla improvements that don't require technology.

Then we build a library which contains a custom techtree, and a carbon copy of all the improvementtypes. This techtree contains one redundant tech for each improvement. The racemod then declares, in the raceconfig through KnownStartingTech which buildings are used from vanilla, and ignore those to be replaced by the mod. The library is updated, the modder only needs to update the buildings he himself changed.

 


 

Those are the solutions I can think of.

 

The first thing I thought was that Solution B would be the best. It's by far the least invasive. However... most of us building racemods do so with the intention that they should be usable by the AI as well. And the AI will build cities that contain 50% or more huts/houses. Half of these will be vanilla tile, half will be modded style with solution B.

 

Solution E is the cleanest. Factions from the faction editor are not harmed. But someone has to maintain the library, and it's going to be a lot of work (I'm not interested).

 

God damn, this modding system is fucking bollocks.

Anyway. Comments?

 

 

13,253 views 19 replies +1 Loading…
Reply #1 Top

Solution X:

Pray, hassle, complain and cry to devs to quickly introduce the possibility to have multiple race-prerequisites.

For example, currently

        <Prereq>
            <Type>Race</Type>
            <Attribute>Men</Attribute>
        </Prereq>

        <Prereq>
            <Type>Race</Type>
            <Attribute>WoodElves</Attribute>
        </Prereq>

in one improvementtype means noone can use it. Beg, steal, poke, troll the devs until they change it to an "OR" statement instead of an "AND".

Reply #2 Top

I will rephrase each option to get a more compacts idea of the options:

  •  Solution A: Redefine all buildings and restrict old ones
  •  Solution B: Redundant new buildings with the new appearance 
  •  Solution C: Tech requirements
  •  Solution D:  Not modding resource tile improvements, only 5 basic buildings need to be defined then
  •  Solution E:  Duplicate building references restrict version 1 to race, restrict version 2 to specific techs for each building. It could be limited to the 5-6 basic ones to make it easier

 

 

I think Solution E would be best right now, as it combines the best parts of each option, I think we can agree to skip modding resource tiles, without problems...

Reply #3 Top

Well, if we're going for option E we might as well NOT restrict resource tiles.

Edit: Managed to hook Cari_Elf to the thread!

03:04 <Cari_Elf> HEvenfall, I'll talk to the team about your post
03:04 <Cari_Elf> see if anyone can come up with a brilliant idea

Reply #4 Top

Actually I think I don't fully understand Solution E...

wouldn't it have the same problem as C? needing all core factions to be edited (no one can mod them anymore, then) and breaking the campaign?

The more I work in this, the more I find problems or ignorance on the proposed solution implementation...

So changed my mind again, I will stick with option B  or actually redesign the building to be really new and different , as it's the least intrusive one and compatibility is my most important concern. Race variety will be one of the more interesting aspects in coming mods, so I don't want to encourage tendencies, that create conflicts of any kind.

If I ever make an extensive mod with tons of buildings, I will create a new allegiance requirement.

Ideally Cari_Elf manages to implement some brilliant idea :P

Reply #5 Top

Quick question, is tech prereq in improvement AND or OR? If it's OR, we can probably modify option C a bit where you essentially have a copied tech tree for new improvements, and then instead of using KnownStartingTech to add old improvements, just add the <Prereq> copied tech </Prereq> to the old improvement in the mod.

 

ReEdit for clarification:

For the buildings the don't have tech prereq, add 2 tech, called "Kingdom" and "Empire", prereq the appropriate one and KnownStartingTech the default factions.

Then new races would come with a custom tech tree that is essentially identical to the old one (complete with a "Custom Kingdom" tech for all basic buildings). New buildings tiles would prereq the new tech tree. Old buildings tiles would need a quick mod by adding prereq to the new tech tree as well. It shouldn't change anything for the core factions, and considering the new tech tree is the same as the old one, the AI should be able to use it?

 

I'm not sure how the campaign will work though.

 

Re-ReEdit: I'm begging too! XD

 

Reply #6 Top

[quote]Beg, steal, poke, troll the devs until they change it to an "OR" statement instead of an "AND".[\quote]

Dev, please consider this a BEG! :)

Reply #7 Top

Well. For my Undead Rising Mod, Notice I have the Undead Keep replace the basic Main Building the fallen faction would normally use. How did I do that without having it replace the main building for every fallen faction? To be honest, I didn't. Dhuran did. How did he do it? I'm not entirely sure but I'm working on replicating it for other buildings I'm still making tiles for. I would say to check the XML for how he did it with the Undead Keep that replaces the standard main city building.

I'm still trying to get ahold of Dhuran to have him help me with some things. If I reach him I'll let him know what's going on here and point him your way if he has time.

We did notice though they make us go through a lot of steps and have to duplicate a lot of things just to do the simplest stuff when modding here.

Reply #8 Top

Correction... we need both, OR and AND, not just one or the other!

Reply #9 Top

Well. For my Undead Rising Mod, Notice I have the Undead Keep replace the basic Main Building the fallen faction would normally use. How did I do that without having it replace the main building for every fallen faction? To be honest, I didn't. Dhuran did. How did he do it? I'm not entirely sure but I'm working on replicating it for other buildings I'm still making tiles for. I would say to check the XML for how he did it with the Undead Keep that replaces the standard main city building.

I'm still trying to get ahold of Dhuran to have him help me with some things. If I reach him I'll let him know what's going on here and point him your way if he has time.

We did notice though they make us go through a lot of steps and have to duplicate a lot of things just to do the simplest stuff when modding here.
End of quote

 

If I understand you right, you just replaced the city hub for the different lvls of the city. This presents no problem, same with wallsets modding.

 

Correction, we need OR, AND, IF and XORs, ok maybe not the last one, but having conditional modifiers would be awesome. Maybe we get to do this through scripting only :(

 

I will join the begging, Ftagn!

Reply #10 Top

Quoting Xiwi, reply 4
Actually I think I don't fully understand Solution E...

wouldn't it have the same problem as C? needing all core factions to be edited (no one can mod them anymore, then) and breaking the campaign?

The more I work in this, the more I find problems or ignorance on the proposed solution implementation...

So changed my mind again, I will stick with option B  or actually redesign the building to be really new and different , as it's the least intrusive one and compatibility is my most important concern. Race variety will be one of the more interesting aspects in coming mods, so I don't want to encourage tendencies, that create conflicts of any kind.

If I ever make an extensive mod with tons of buildings, I will create a new allegiance requirement.

Ideally Cari_Elf manages to implement some brilliant idea
End of Xiwi's quote

No, solution E is

we change all the core, vanilla non-tech buildings to require their race (men/fallen). No problem so far.

Then we build a library for modders to use, that provides an alternative. Instead of each racemod containing all the full improvementtypes, we provide the individual modder with a list of reference techs, to be included in the custom tech trees, that each unlock a building, and are to be included via KnownStartingTech IF the _modder_ so chooses.

So now you have 1) no problems with vanilla races and 2) no need for the individual modder to update buildings he isn't actually using - only the library needs updating.

Quoting Kalin, reply 5
Quick question, is tech prereq in improvement AND or OR? If it's OR, we can probably modify option C a bit where you essentially have a copied tech tree for new improvements, and then instead of using KnownStartingTech to add old improvements, just add the <Prereq> copied tech </Prereq> to the old improvement in the mod.

 

ReEdit for clarification:

For the buildings the don't have tech prereq, add 2 tech, called "Kingdom" and "Empire", prereq the appropriate one and KnownStartingTech the default factions.

Then new races would come with a custom tech tree that is essentially identical to the old one (complete with a "Custom Kingdom" tech for all basic buildings). New buildings tiles would prereq the new tech tree. Old buildings tiles would need a quick mod by adding prereq to the new tech tree as well. It shouldn't change anything for the core factions, and considering the new tech tree is the same as the old one, the AI should be able to use it?

 

I'm not sure how the campaign will work though.

 

Re-ReEdit: I'm begging too!

 
End of Kalin's quote

I thought about it, but it's far better to simply go with adding a race prerequisite as in solution E. You suggested a variation of doing solution C instead, not race-prerequisites for the standard vanilla buildings, but a tech prerequisite. All the problems under C apply, and imho solution C is the worst option.


Edit: Note that a mechanic requirement for KnownStartingTech is that the tech is already inside the race's techtree.

Reply #11 Top

Ooh! Slight breakthrough!

If we use abilitybonus instead of knownstartingtech, we can apply technologies OUTSIDE the tech tree to faction.

So we definitely DO NOT have to edit ANY tech trees. On the downside, the ability will show up when selecting a race. Still, this is a gamechanger.

Edit: So, solution E slightly modified.

We add all the race prerequisites to the standard buildings.

Then we build a library of techs and buildings for modders only to use.

Each modder applies an AbilityBonus to their own raceconfig. It looks something like this

 

<AbilityBonus InternalName="MyUniqueRace_XXX_Uniqueinternalname">
    <AbilityBonusType>Player</AbilityBonusType>

    <AbilityBonusOption InternalName = "MyUniqueRace_XXX_UniqueinternalnameBonus">
      <DisplayName>Elven race</DisplayName>
      <Description>This bonus is required for all wood elf factions.</Description>
      <Bonus>10</Bonus>
      <Cost>2</Cost>

        <GameModifier><ModType>Player</ModType><Attribute>UnlockTech</Attribute><StrVal>RACEMODLIB_usecoreKingdomWorkshop</StrVal></GameModifier>


    <GameModifier><ModType>Player</ModType><Attribute>UnlockTech</Attribute><StrVal>RACEMODLIB_usecoreKingdomArcaneLaboratory</StrVal></GameModifier>
    </AbilityBonusOption>

  </AbilityBonus>

End of quote

And so on.

In that example, I would use standard workshop and arcane lab, but every other (non-tech) building would be custom.

Comments? I'm feeling pretty confident that is the way forward.

Reply #12 Top

Too late, I already did it (and tested) for the 5/6 starting buildings.

AFAIK if the modtype for the ability bonus isn't player, it won't show in the faction editor. I'm almost sure it's required so this isn't very meaningful.

Sounds like an alternative, you failed to point the real good part about your solution (and stupid me.. I actually played with unlocktech abilities in the past and didn't think of this, I should really get some sleep). The nice part is that unlocked techs will actually show as completed and you will have all of them showing!. Ok this may be bad if there are 80 techs at start xD, but I miss startingtechs showing  :wc:

 

It's only a matter to do the other buildings now, I actually prefer using a techtree, feels more structured, although I can understand everyone else hating them, first contact may be painful. Here is the file if someone feels like adding more buildings. As I don't use it, I think I will leave it be to someone else to complete for the time being =). If you delete the extra race requirements for non basic buildings, this will be functional :P

I have to go now ;)

good luck!

http://dl.dropbox.com/u/2613529/Elemental/ModSupportTechTree_BasicBuildings.xml

Reply #13 Top

I prefer using bonusability instead of knownstartingtech, however, on the other hand it's up to the modder, not me.

Again let me reiterate that you are doing something very strange, which is locking ALL buildings to a race, when only the buildings without a technology need to be locked! Buildings with technology are already locked! You are creating unnecessary work.

I don't think it's good practice (in fact I think it's BLOODY STUPID), and I ask that you please reconsider. This is the third time now I am trying to tell you that buildings with a prereq for technology are already locked - to their technology.

Edit:

The nice part is that unlocked techs will actually show as completed and you will have all of them showing!. Ok this may be bad if there are 80 techs at start , but I miss startingtechs showing 

End of quote

This only applies to techs inside your own tech tree. The modder can choose what he wants. Edit3: This statement was wrong. However, if the category is a category that the race ordinarily doesn't have access to, the tech doesn't show up aynwhere in "Completed".

Edit2: I'll put together a Kingdom library.

Reply #14 Top

Library

http://thedyinggrounds.com/Elemental/racelib/LIBracemod_defaultKingdombuildings.xml

Custom Faction with Unique RaceClassification that has access to all default kingdom non-tech buildings:

http://thedyinggrounds.com/Elemental/racelib/CPELF_RaceConfig.xml

 

If noone has any objections, I will create a similar library for empire, and then create a new thread detailing the library, who its for, who it affects, how to use it, why it's needed, and so on.

Edit: Have to be extra careful to remind everyone that the hut in that library will upgrade to a specific improvement. If you're doing a house but not a hut, you'll need a custom hut too.

 

Reply #15 Top

Quoting Heavenfall, reply 11
Ooh! Slight breakthrough!

And so on.

In that example, I would use standard workshop and arcane lab, but every other (non-tech) building would be custom.

Comments? I'm feeling pretty confident that is the way forward.
End of Heavenfall's quote

 

I think this is the best solution I have seen so far.

Reply #16 Top

Very good stuff. :)

Reply #17 Top

It was a work in progress in 2 different ways, I realize I failed to explain second one so it didn't make sense:

 1) Lazy one way (this is for me): I was going to leave only basic buildings  as stated (still needed to recheck which resources didn't require techs, just in case patches changed anything, you just did that for me with kingdom buildings). It's easy enough to do this so I will do, even if not planning to use right now.

1.b)I could also include alt designs for hut upgrades correctly linked in tech tree with cloned alternate dependencies in case people wants to have support for them. With your way you would only grant the ability to build them directly. I would actually redesign that part of the tech tree so final modder, doesn't have to worry about it and it's perfectly integrated. This is going to take some work in the end, so I will leave it be for the moment.

 2) Complicated nitpicking exhaustive way: You need to do all buildings, delete old techs and redo the tree to something more coherent building wise, basically split each tech only giving one component, then do it for units, weapons etc. Then you would need the original tech requirements removed and only use your own. That way you could have a library enabling full control of all assets related to the tech, with names, which you can tell right away, what they unlock. Yeah this would be a huge ammount of work. I didn't intend to use both tech requirements, that's why I was expecting someone else to do the work, but forgot to explain. I would bet no one would do it and that time is better spent adding content to the game.

 

I will finish the compact tech version in the event someone finds an use to it, now thay I have time, although I should really get some sleep.

I hope I made my point about why techtree approach has merits and why I was suggesting an exhaustive redesign of whole tech tree and required techs. You may end up doing it anyways if you follow all dependencies. Anyways msot important part, editing techtrees leasds to diversity, diversity leads to replayability and replayability leads directly to the dark side, ermm no that part must be wrong.

 

Your links again, so no one misses them with my stupid talk:

[quote]

Library

http://thedyinggrounds.com/Elemental/racelib/LIBracemod_defaultKingdombuildings.xml

Custom Faction with Unique RaceClassification that has access to all default kingdom non-tech buildings:

http://thedyinggrounds.com/Elemental/racelib/CPELF_RaceConfig.xml

Edit: Have to be extra careful to remind everyone that the hut in that library will upgrade to a specific improvement. If you're doing a house but not a hut, you'll need a custom hut too.

[quote]

 

 

 

 

Reply #18 Top

I'm all for techtree diversity, but there's no need to put all that in a library. Let the individual modder do it. This is for the stuff we HAVE to break for EVERYONE to create something better. A custom techtree is just standard modding.

I will make an empire version now, and a new thread.

Reply #19 Top

At first I was confused by this. I already had added the race prereq for my custom race. However, they have all different buildings. I like the idea of the library. Good work! If you need any help, let me know.