Modding on a Sunday night: Part 2

Our story so far…

Lest you think I’m some sort of shut-in. I really did go outside today. Cider Mill and then played with the kids.  So 2 hours spent moving around and the rest of the day in front of the computer.  That’s a ratio I can live with. :)

image
Only 2 broken bones…

Adding Technologies

Adding technologies to Elemental is still a work in progress because the research screen in Elemental is still a work in progress.

 

image
The UI needs some work…

So before we talk about modding the “tech tree” in Elemental we should probably talk about the concept behind researching in Elemental.

Elemental doesn’t have a traditional technology tree.  The idea here to have a lot fewer “techs”, each of which do something very very interesting in the game (as opposed to in GalCiv where you were researching “lasers IV”).

In Civilization IV getting a technology did something for you that changed the game and made it more fun but of course, once you have it, you have it.

So in an effort to have our cake and eat it too the idea here is that you get a technology and getting that technology does something “cool.”.  For example, researching “Adventuring” will unhide the dungeons on the map (well not right now, but it will eventually).  Researching mining will unhide metal ore you can mine. Researching education allows you to build schools in your cities, and so on.

But on top of that, once you have researched something, you can then keep focusing on that technology make it better than better.  So researching mining will let you mine metal. But you can also continue to research mining and will continually get tiny bonuses in your mining ability for as long as you want to research it. Hence, you get an infinite tech tree.

So here’s how it works right now:

image

We have a file called “CoreTechs.xml”

The file name is irrelevant though to the game – as mentioned previously, any XML file will be read in and parsed. It’s the keyword that matters. We could have made every technology its own file if we wanted (that would be a headache though for us).  But when the time comes and you want to start submitting your own mods, you’ll want to make sure you’re creating unique files and not uploading “coretechs.xml” or something.

Now, the highlighted parts are ones I have no idea what they do and no idea why they’re there.  I will ask about them next week.  The rest is pretty straight forward after a bit of experimenting.

First, you define the technology’s internal name. Then you have a display name and the image you want to use for it. 

Next, you then set up whatever types of pre-requisites you want for that tech. Right now, techs only require other techs as pre-requisites but eventually you could have all kinds of things required to research a given tech (maybe an ancient scroll you uncovered from an ancient ruin, maybe something your hero got on an adventure, maybe a random event, whatever).

The “value” part is how many research points it takes to get that tech.  By default (in beta 1B anyway) each citizen produces 0.1 research points per turn.  So if you make something cost 10 research points, it will take a down of 100 a single turn to get it (very easy).

Next is the tech bonus you define. This is your “infinite” research element.  It needs some work though still as this isn’t finalized.  But basically what it will do is define what sort of bonus researching that tech will provide your civilization.  So for instance, what it should do is that every 100 points you spend on “Farming” should give you a 1 percent bonus to your farming output.  But we have a “TechLevel” field that I suspect is going to go away and we won’t be displaying it as a “tech” on the screen since it’s not a tech, it’s a bonus.

More answers on modding

What will and won’t be possible in Elemental for modders is still really up in the air.  That’s why I’m planning on becoming an Elemental modder early on so that I can be making mods and push the engine early enough so that things can be changed in the engine.  A simple Temple of Apshai type mini-game using the Elemental engine and Python is going to be my test case (not for awhile mind you but hopefully before the game comes out).  That will give us all an idea of what is and isn’t possible. :)

65,306 views 30 replies
Reply #1 Top

As someone who already tried to mod something in (and was forced to uninstall and install again because of that...), any idea of when minimods will be possible? Be it a new race or just changing the pieces of a figurine like I was trying. XD Around Beta 2? Really need to wait for Beta 5?

Reply #2 Top

What about an XML attribute that allows us to determine if some sort of exponential formula is used for infinite research (either in research cost or benefit reduction)? Then I could say to players, "Yea you can research it forever, but it gets less and less effective the more you do it."

Reply #3 Top

As someone who already tried to mod something in (and was forced to uninstall and install again because of that...), any idea of when minimods will be possible? Be it a new race or just changing the pieces of a figurine like I was trying. Around Beta 2? Really need to wait for Beta 5?
End of quote
Yours actually creashed the game? Compared to where I am now (mods that don't do anything no matter what I change), that's an improvement!

Reply #4 Top

Yea, Wintersong, I tried modifying one of the xml files (a race description for easy testing) and checking "Using Mods" on the menu, and it didn't seem like anything had changed.  Did you do something different?

Edit: and yes, a slow-sloping exponential formula (n + log log n or something?) of some sort for the infinite tech costs would probably be better than something linear, but perhaps further testing is in order before we can tell.

Reply #5 Top

Would it be possible to assign multiple attributes to the infinite tech part in such away that different attributes can be modified at each tech lvl increase?  For instance, the first bonus is to your farming, the next bonus is to the building, creating a farm cheaper or quicker.  So on back and forth between those infinitly.

If that is possible... Would it be possible to randomly assign these bonuses?  As an example, you research iron swords, rather than making it do more damage with each tech lvl there is a random chance of the following three.  More damage (sharpness), quicker to produce (manufacturing), or bonus hp (sturdiness).  

Reply #6 Top

Now, the highlighted parts are ones I have no idea what they do and no idea why they’re there.  I will ask about them next week.  The rest is pretty straight forward after a bit of experimenting.
End of quote

I think that those Color refer to the icon colouring (perhaps a colour that shows through the alpha on the image.) The Hotcolor is likely the colour change for when the image is highlighted or selected. At least I am guessing ^_^

Reply #7 Top

I don't think you guys can mod anything right now because the data is streamed from the servers.

Reply #8 Top

Yea, I think it's overriding anything we have locally.  Not sure if the "Use Mods" game option tells it to use local files first but I doubt it does that because it could theoretically be used to bypass the internet-requirement of the beta.

As for Color and HotColor, there's the fill color of the research bar at the bottom right of the main screen, just select a tech and hit turn a few times and you'll see it.  I'm not sure if it's Color or HotColor, but you could set one to black or white and find out fast.

Reply #9 Top

A simple Temple of Apshai type mini-game using the Elemental engine and Python is going to be my test case (not for awhile mind you but hopefully before the game comes out). That will give us all an idea of what is and isn’t possible.
End of quote

I still have the box for Temple of Apshai - ah the memories. Gee way to go to make me feel old.

  :D

Reply #10 Top

Me too. In fact, I think once we're done with Elemental, we need to see about remaking Mail Order Monsters!  :D

Reply #11 Top

Quoting Gunshy, reply 10
Me too. In fact, I think once we're done with Elemental, we need to see about remaking Mail Order Monsters! 
End of Gunshy's quote

*Drool*

Reply #12 Top

Oh no.

I hope, however, that focusing on a tech will not give a linear bonus according to the amount of additional research spent on it; that would be gruesome. At the very least, diminishing returns should be built in by default, and there should be a (slider) setting in game setup options which allows users to set the global default amount of boni additional research adds *per unit*. By that, I mean that the first time you finish re-researching your Tech 1 (say, Mining), you might get a X% bonus, call it 25% bonus (not a 1% bonus for Lord's sake) -- or at least something substantial -- while the second time you spend the same amount of research on it, you should get a X-Y% bonus, where Y is a value based on the function indicated in the global default setting. Additional research should be very substantial, at least at first.

Ideally, which sadly will not happen in Elemental, additional research should unlock new "cool things", as Brad said. Too bad!

Reply #13 Top

Quoting onomastikon, reply 12
Oh no.
Ideally, which sadly will not happen in Elemental, additional research should unlock new "cool things", as Brad said. Too bad!
End of onomastikon's quote

I agree....but wait, it should be possible to mod that in, correct? Example:

Mining = Unlocks stone deposits on the map

Advanced Mining = Unlocks iron deposits on the map & +10% mining efficiency

Adv. Mining II. = Unlocks mithril deposits on the map & +15% mining efficiency

This must work theoritically.

Reply #14 Top

I think the the formula to determine the bonus should be moddable, if only in a simple fashion.  Linear is nice, but some of us micro-manager simultation-lovers might prefer logarithmic or some other type of diminishing returns.

Reply #15 Top

For what it's worth, there is a relative diminishing returns built into the current formula.

For example, if you have 10,000 population, and just got mining, then the first day of improved mining research will double your mining effectiveness. After researching mining for one week, then another day only increases your mining effectiveness by 12%. After researching a month, then the next day of research is only worth 3%.

 

Reply #16 Top

Yes, the inherent diminishing proportions may be quite sufficient, we'll see in testing.

Reply #17 Top

Quoting Tormy-, reply 13

Quoting onomastikon, reply 12Oh no.
Ideally, which sadly will not happen in Elemental, additional research should unlock new "cool things", as Brad said. Too bad!

I agree....but wait, it should be possible to mod that in, correct? Example:

Mining = Unlocks stone deposits on the map

Advanced Mining = Unlocks iron deposits on the map & +10% mining efficiency

Adv. Mining II. = Unlocks mithril deposits on the map & +15% mining efficiency

This must work theoritically.
End of Tormy-'s quote

It already work like that !!

But when you have researched the mithirl ? When you have reach the "end" of the tech, you can still continue to research.

Reply #18 Top

Quoting Frogboy, reply 7
I don't think you guys can mod anything right now because the data is streamed from the servers.
End of Frogboy's quote

Does this mean that the .xml files in the /English folder are overwritten every time the game is loaded? Or are they ignored?

Reply #20 Top

Quoting vieuxchat, reply 17



Quoting Tormy-,
reply 13

Quoting onomastikon, reply 12Oh no.
Ideally, which sadly will not happen in Elemental, additional research should unlock new "cool things", as Brad said. Too bad!

I agree....but wait, it should be possible to mod that in, correct? Example:

Mining = Unlocks stone deposits on the map

Advanced Mining = Unlocks iron deposits on the map & +10% mining efficiency

Adv. Mining II. = Unlocks mithril deposits on the map & +15% mining efficiency

This must work theoritically.


It already work like that !!

But when you have researched the mithirl ? When you have reach the "end" of the tech, you can still continue to research.
End of vieuxchat's quote

Nice...but can we disable the continous research if we would like to?

Reply #21 Top

You can empty the current-research slot in the beta, which stops all research.

Reply #22 Top

^ Oh...cool. :)

Reply #23 Top


But when you have researched the mithirl ? When you have reach the "end" of the tech, you can still continue to research.
End of quote
The problem with this system is this: You would need an infinite amount of "new stuff". Fine. But all of that new stuff needs to be created  before hand (i.e. you can't auto-generate more whenever you run out). Since the stuff requirement is infinite, that also means creation time is infinite. Since players and coders sort of need dev time to end, you cannot have infinite new things. Probably never will, unless it becomes possible to create a creative AI that can churn it out faster than a human player can take it in (even then, it just seems infinite: the tech tree is still finite, but grows faster than you can "cut" it).

Reply #24 Top

<warning>new to the whole modding scene</warning>

The technology example given at the start of the thread appears to just be a simple migration of the technology configuration from compile-time (hard-coded data structures) to run-time (config read into data structures).  Is this considered modding because one can edit the technology parameters/attributes at any time?

I had been under the impression that modding allowed one to change the mechanics and behaviors (i.e., the rules) of the game, but this seems to just be tweaking things within a fixed framework.  Is the example here just one aspect of the overall modding capabilities that will be supported?

Reply #25 Top

This is just one of the forms of modding that will be available, yes.

More detail at: https://forums.elementalgame.com/349782