Frogboy Frogboy

Modding on a Saturday night

Modding on a Saturday night

This weekend I’m trying to see how much I can do to the game without having to have access to the source or, for that matter, without having art skills.

Right now, for beta testers, there’s not much modding possible because there are is no documentation and the data is streamed from our servers so that we can do real-time updating. 

Here’s how modding works:

First, you have to think of everything in the world in three parts:

1. The data that explains what the thing you want in the game is.

2. The image that represents the thing you want in the game.

3. The 3D object that represents the thing in the game when seeing it in 3D.

Right now, we’re lucky because the 3D engine is disabled in the beta and in the final version, there will be a huge pool of 3D assets that modders can make use of or use the built in mod tools to create without ever having to crack open Maya or 3D Studio.

So for tonight, I decided to make a new resource called twilight bees.  This would be a food resource.

Step 1: The data

The biggest load hog on Elemental right now is because of the way we do our XML. We will have to optimize it but it was done to make modding easier.  The idea is that you can toss in any XML file in the data/<your language> directory and voila, the game will read it in.

This way, modders don’t have to worry about modifying existing files. They can easily add their own files.

So I created a file called twilightbees.xml

Using the “stuff” I found in coreresources.xml I reversed engineered how resources were put in (yea, if I was at work, I would just ask but I’m at home so I have to figure it out or worse, look through the google docs on the project).

image

The stuff I highlighted is the stuff I couldn’t figure out and think it needs to be either taken out entirely or have a pretty important point for existing because they don’t seem to matter except rarity but what does “3” mean?  I am going to ask that rarity be simply a percent 0 to 100% odds of the item showing up in a given tile.

Step 2: The image

I found a bee hive image on the net and copied it into the gfx/tacticalicons directory.

In the game

They I ran the game and was greeted with this:

image

One thing that was nice is that I didn’t have to worry about sizes. Old modders reading this know what I speak of.  The game took care of sizing it properly for me so I didn’t have to make it some 128x128 image or whatever.

image

Once I had farming tech, I could build a farm on the twilight bees.  Why a farm?

Because I kept the <Type> as fertileland and in the file k_farming.xml is where the “farm” improvement is.

image

One thing I learned is that there is a lot of XML possibility already in the current beta.  For example, there is also a f_farming.xml for the Fallen farm.  What resources show up is all data driven and what improvements, how they look, what they do, is all data driven.

So for instance, I could create a race of dwarves with their own tech tree, their own improvements, but could act on the same land in different ways.  Maybe Dwarven mines, for instance, could be more productive than the standard mines.  Or maybe there would be resources that only dwarves could even see on the map.

My main complaint right now though is the sheer amount of clutter that I’m not convinced is necessary. We’ll have to be careful not to let too much legacy XML stay in there.

Now, the question rises, what should be in the game by default in terms of “stuff”?  It’s always a challenging question to answer.  For instance, having spent years playing games from Dominions to MOM to Civilization and HOMM and so on, each game has its own take on how much “stuff” the user needs to deal with.

I’m of the opinion that I’d like to see quite a bit of different stuff on the game map that does interesting things even if it makes the map a bit more “cluttered”.

Tomorrow, I plan to start digging into the technology trees for the game.

83,759 views 42 replies
Reply #26 Top

Quoting onomastikon, reply 25



Quoting SaberCherry,
reply 23
Frogboy plays Dominions?  This is great news, and vastly improves the chances of Elemental having coastal illithid-hybrid tentacle monsters!

...keeping my fingers crossed for a blood magic sphere...



Forget it! I think Brad knows of Dominions, and may even like it, but he's aiming for something much more streamlined and accessable here. Mechanics like fear, morale, routing, weapon length, awe, unit attributes, weaknesses, etc etc etc won't make the cut, so we won't be able to mod anything like an illithid!

I will be very sad, if we won't have morale&weaknesses&attribs -for example- in Elemental...I mean what the hell? We had attribs in Civ4 even [promotions+attribs]...and the Civ4 combat system is very simple. Also..the morale system is an important gameplau element of the better [fantasy] strategy games. Weaknesses? Very important also, because you gotta think a bit actually. Your swordsman shouldn't attack a cavalry unit, but what about units equipped with long spears? etc. etc.

Having ATT/DEF/SPEED only in a strategy game like Elemental....well..it would be a big mistake.

Reply #27 Top

... the morale system is an important gameplau element of the better [fantasy] strategy games.

Like King's Bounty? Heroes of Might and Magic? Disciples? Or, on the RTS side, Warcraft?

Reply #28 Top

Quoting Tormy-, reply 26

Having ATT/DEF/SPEED only in a strategy game like Elemental....well..it would be a big mistake.

Yep.  I really, really want a deeper combat system than Civ 1 or Gal Civ II.  Attack types, weaknesses, multiple stats, and an interesting combat model are vital to the depth and immersion of a good fantasy strategy game.

Reply #29 Top

I concour. With all the "stuff" being poured into other aspects of the game, keeping combat at the same level as GC2 seems a bit of a waste.

Reply #30 Top

Quoting zigzag, reply 27

... the morale system is an important gameplau element of the better [fantasy] strategy games.


Like King's Bounty? Heroes of Might and Magic? Disciples? Or, on the RTS side, Warcraft?

Indeed..or many others.. :) Hm...I don't remember...do we had morale in MoM? We had lot of different attribs in MoM for the units, but I am clueless about the morale. I haven't touched that game for many years now. :X

Reply #31 Top

MoM had fear effects; some monsters required a passed fear-check to attack or counter-attack in melee.  This was based mostly on the catch-all resistance stat and generally the stronger units didn't fail resist rolls.

Reply #32 Top

Zigzag was being ironic; none of those really had morale such that you could win a battle by routing the opponents.  The only games I've played with prominent battlefield morale are Dominions, Europa Universalis, X-COM, Jagged Alliance 2, Lords of the Realm, and the Total War series.  Most games don't bother because it can annoy the player.  HoMM has something called morale, but it has nothing to do with battle odds and units fleeing and thus is a different concept.  Other games like Mount and Blade have morale off the battlefield where it is not as immediate.

I don't really care whether Elemental has morale or not, simply because it is very hard to implement in a fair, realistic, and fun manner.  That said...  it would be nice if it COULD be implemented in such a way, but not at the expense of other things, like getting the combat model right.

Reply #33 Top

Zigzag was being ironic; none of those really had morale such that you could win a battle by routing the opponents.  The only games I've played with prominent battlefield morale are Dominions, Europa Universalis, X-COM, Jagged Alliance 2, Lords of the Realm, and the Total War series.  Most games don't bother because it can annoy the player.  HoMM has something called morale, but it has nothing to do with battle odds and units fleeing and thus is a different concept.  Other games like Mount and Blade have morale off the battlefield where it is not as immediate.

Derr... HoMM's morale is the same concept as morale in the other games, just implemented very differently. And it does allow you to effectively win a battle by 'routing' your opponents. Sure, they don't run off the screen (there is no game mechanic for such a thing), but if your opponent's troops only get to move every other turn, or maybe even less, you have a huge advantage.

In King's Bounty morale is handled very differently, but again with a similar overall effect. Higher morale troops are significantly more effective than lower morale troops. It's not as critical as in Total War or HoMM, where low morale can completely destroy you, but it's effect can be very noticeable when it's very high or very low.

Regardless, I agree that sticking to just attack, defense and hp would be a huge mistake... If combat were going to be fully automatic like in GC2, sure why not. But there is going to be actual tactical combat... But with just those three traits, there may as well not be tactical combat. I'd rather have no TC than dumbed down and painfully simple TC.

Reply #34 Top

^ Yeah, HoMM & King's Bounty had morale/fear for sure [I was playing with those games], so Zigzag's post cannot be ironic at all. :P

Reply #35 Top

Zigzag was being ironic; none of those really had morale such that you could win a battle by routing the opponents.

This is correct. It was ironic. Morale/fear in HoMM and King's Bounty is a modifier which controls the frequency at which units attack. It's controlled through artifacts, hero skills, and unit affiliation; not wins/losses. It's more of a mechanic which happens to be called morale, than an attempt to actually model something like battlefield morale. I mentioned them because their morale systems nothing like the Civil War General-like suggestions being made. My opinion, to make it a little more transparent, is that if Elemental has a morale system, it should be a simple one, like in HoMM or King's Bounty (or Age of Wonders).

Reply #36 Top

Double post.

Reply #37 Top

Quoting zigzag, reply 35

Zigzag was being ironic; none of those really had morale such that you could win a battle by routing the opponents.


This is correct. It was ironic. Morale/fear in HoMM and King's Bounty is a modifier which controls the frequency at which units attack. It's controlled through artifacts, hero skills, and unit affiliation; not wins/losses. It's more of a mechanic which happens to be called morale, than an attempt to actually model something like battlefield morale. I mentioned them because their morale systems nothing like the Civil War General-like suggestions being made. My opinion, to make it a little more transparent, is that if Elemental has a morale system, it should be a simple one, like in HoMM or King's Bounty (or Age of Wonders).

Morale & Fear effects are very different in the various strategy games [Like you've said in HoMM the units won't attack if their morale is broken...while in other games the given unit will rout/flee if it's morale is broken or the unit is feared for example], but I guess we agree: There needs to be a morale system in Elemental.

Reply #38 Top

Morale & Fear effects are very different in the various strategy games [Like you've said in HoMM the units won't attack if their morale is broken...while in other games the given unit will rout/flee if it's morale is broken or the unit is feared for example], but I guess we agree: There needs to be a morale system in Elemental.

Not so much: I don't think the game needs a morale system, but if it does, it should be a HoMM/KB/AoW-style system, not a Civil War Generals-style system. Or, to quote myself:

My opinion, to make it a little more transparent, is that if Elemental has a morale system, it should be a simple one, like in HoMM or King's Bounty (or Age of Wonders).

Reply #39 Top

I had no probs with the HoMM/AoW style morale system. It was good enough. ^_^

Reply #40 Top

It would be nice if there was at least some basic concept that a unit can get so scared out of their wits that they're (temporarily) not good for much.  We'll have to make sure to equip them with spare sets of underwear.

Reply #41 Top

Quoting zigzag, reply 38

Morale & Fear effects are very different in the various strategy games [Like you've said in HoMM the units won't attack if their morale is broken...while in other games the given unit will rout/flee if it's morale is broken or the unit is feared for example], but I guess we agree: There needs to be a morale system in Elemental.


Not so much: I don't think the game needs a morale system, but if it does

 

Hm....I was thinking a bit about this today, and I don't agree. I think that if there is a game, which needs a morale [& fear] system, that is Elemental. It wouldn't make much sense if 2-3 peasants wouldn't get scared by a dragon or demon for example. They should drop their pitchforks, and [try to] flee in terror. [..or they shouldn't be able to attack at least -> HoMM style.... the key here is the penalty because of the heavy morale loss/fear effect.]

Reply #42 Top

Morale should let our units do the following :

- going berserk

- fleeing

- being shaken but still fighting

- acts of valor

- flee in good order

- try heroic actions

 

the most important thing about morale is that is contagious. When you're fighting with comrades whose faith in their sword is high, you won't be easily afraid.

 

Anyway, I hope we'll be able to mod combat rules. But I'm afraid that if modders add something new like morale or fatigue, the computer won't be able to take good decisions about its units.