News:

Check out the latest MegaGlest news on our e-mail newsletter (subscribe), Twitter, Facebook and Google+.

Main Menu

Mandate Update Thread

Started by MoLAoS, 2 September 2012, 03:39:38

MoLAoS

I decided to just make one thread about my fork and not post new threads but mainly just update this one:

Videos:
Mandate related supply chain example:
https://www.youtube.com/watch?v=tZe2R0LGQJY&feature=g-upl
Mandate related item system demo:
http://www.youtube.com/watch?v=KoHTr4m37Bs&feature=youtu.be

My blog is available at my website at:
www.lordofthedawn.com/wp

SourceForge page, not super useful yet:
https://sourceforge.net/projects/mandateengine/

GitHub Page, also not incredibly useful, does have copy of master branch:
https://github.com/MoLAoS/Mandate

The website is not currently in serious use and mostly dealt with two of my previous projects. The blog is updated daily or weekly depending on my mood.

List of previously added features:
[spoiler]Abilities system which is somewhat like effects and includes manaburn and lifesteal and similar effects
Local storage and production of resources
Global automatic production of resources by buildings/units
Process system which consumes some resources to produces others based on the auto production system
New resistances system for damage types which works for both "armor" for physical damage and resistance for magical or technological
Items which can add abilities and effects as well as bonus enhancements of both static and multiplier types
Staged upgrade system complete with optional names for different levels
Optional increasing costs per unit of the same type
Unit/Building/Resource/Item Capturing system
Increasing unit stats/enhancements values for stats as well as store, create, process, and cost modifiers for staged upgrades
New garrison command which provides load bonuses to carrier stats based on number of units of a given type carried
Tunnel/Teleportation/Stargate type faction transport system where you load units in one unit and can output them elsewhere
New build order where you build a construction zone of correct size and use streaming resource consumption to build units
Automated resource movement for local storage where you assign a unit 2 structures to transfer materials and products
Formation commands where you can define a formation or set one up in game for units to stay in
Hierarchical system of leader units who can issue commands to whole squads and control things like focus fire and synchronous attacks
Hero/Mage/Leader system with designations for special units with extra abilities
New set of panels for GUI with with items, garrisoned/loaded/faction loaded, general stats, resistances and armors, generation
The ability for buildings to be restricted to specific foundation spots
The ability for some buildings to gain special bonuses and units and other stuff by building near a map object like a volcano
Bonus power based on the time of the day
An AI personality system where some unit types can follow their own unique AI and do many tasks without human help
The ability to build structures from a faction menu
The ability to place buildings directly from other buildings to be built by nearby builder units
Single unit bonuses that can be sold for resources to power up an individual unit[/spoiler]

Partially Completed:
[spoiler]Settlements where you can assign commands like patrol and guard to a group of structures
Area of operation which may include a settlement with commands like patrol and sentry given by leadership
Multi tiered unit hierarchy from squads to cohorts to centuries to legions to hosts
Special order system for automating actions like focus fire and healing priority and other player assisting unit automation
Possibly an HTML/CSS/JS based GUI overhaul to sit on top of current wxWidgets system for custom GUIs including styles and panels
Advanced path finding for both regular units and the tiers of unit group sizes
New passability class/pathfinding logic to enable walkable walls and ships and arbitrarily defined zones of occupancy like lava
Utility based AI system with some minimal hierarchy structure to provide superior challenge
Special AI data injection so that new tilesets/maps/factions or games designed by modders will be supported by specialized AI
New map understanding system for the new AI where it generates its own player like understanding of the map without hardcoded help[/spoiler]

Semi-Complete List Of Intended Features:
[spoiler]Monster taming and breeding system
MMO like crafting system
Support for the majority of MOBA game features
Extensive source documentation for programmers
Advanced science/study system including TBS like research trees
Campaign map type system with support for modders
Update to modeling format with functionality similar to 0 A.D. plus some extra stuff
Graphical update with various normal and spec map capabilities plus superior water rendering
Extensive support for in game terraforming
Support for cliffs and other terrain features[/spoiler]

September 1st:
[spoiler]I added items today and they are working really well. I am finishing up load bonuses, basically if you put more units in another unit they can give bonuses to stuff. So more process or resource creation speed and amount for mines and factories and such. They basically work the same as items so it should be easy.

My next project is the trade route system that uses the already finished local storage functions I have added. I also added a building command that costs resources to do a build action. In academic RTS circles its called streaming construction. You can also do streaming production, ala TA power systems.

Trade routes come with way points and use commands like transport and escort for caravans. Trade routes can be quite complex and are automated.

Following this I will finish the systems for the new building method where you transport resources to a specified site for the local construction system.[/spoiler]

September 20th:
[spoiler]
So I took a long break. Stupid neurological issues.

Currently I am attempting to build the libRocket GUI library into the Mandate Engine. This will allow GUIs to be modified with web standard languages. Although IIRC libRocket is not totally standards compliant its close enough that anyone who knows HTML and CSS can modify the GUI in nearly any way. I intend to provide hooks into C++ for all unit stats. So you can create a unit panel containing only the information you care about.

This should allow some solid freedom for modders and fit well with the new stats system. I would like modders to be able to add arbitrary stats to the game, this should be possible with some vector based classes. So instead of renaming health and energy and abusing resources you can add multiple ammo types, power management and other things to a far future war game. In theory you could even recreate a sim city type game.

This should also allow, assuming my understanding of lib rocket is correct, in game civpedia style manuals as well as more powerful tool tip type options.[/spoiler]

Update on Majesty stuff:[spoiler]

I enabled a new function which allows you to specify that a building can only produce a certain number of a given unit. I know that generally this was done using a resource limit but that was hacky and required making a new resource. Its now enabled by a simple xml line in the produce command. This is because Majesty guilds have a limit on the number of units they can build. This function can also be applied to my engines unit creation on a timer capability which is also enabled in the XML. This is because some Majesty buildings create units of a certain kind but limited to a specific number. Like the castle has x tax guys x guards x peasants.

My next goal is to make a faction menu for unit building. This shouldn't be incredibly hard as I've already learned to make new command types and actually I would just be using produce commands here. Just arranging GUI sections I guess. I was always intending to make this anyways. Now is as good a time as any.

I think my next goal would probably be to create an on created AI system. I'm not sure if I should make a special AI just for this demo and/or game style or put some work in to my main AI that I've been getting intermittent work on. Probably the second.

I think that might even be it since the demo uses the regular art assets.

for my mid libRocket break instead of adding fear and awe I decided to attempt to make a functioning clone of majesty, although you won't have random maps.

sort of like a one off scenario but adding engine support for a simple majesty like AI and using the previously added resource generation and item creating capabilities.

ill have to add the special simple AI, clean up the item display panel and stat bonus code and then repurpose some models to act as stand ins. i think ill make just the ranger, warrior, wizard, peasant and tax guy, and maybe a guard. and for buildings ill do the castle, warriors guild, rangers guild, market place, house, and wizards guild. i may add a guard house and a black smith.

i think ill have quite a bit of fun doing it since game logic and unit and item design is the part of game design i actually care about, as opposed to engine graphics and guis.[/spoiler]

September 27th, 2012
[spoiler]
Today I learned the hell of trying to implement mechanics that a previous person's work were never designed to support. Trying to add commands, even just one, to a faction menu was horrible. There were dozens of obscure functions in dozens of files that traded all skills and commands back to unit types. I have been attempting, for code clarity, to try and make all possible commands work through the built in system but boy is it hard. I eventually had to create a new command class for trading resources, just because it couldn't be done through the normal interface.

Luckily I finally worked through it and in a few hours I can construct buildings from the faction GUI. I can see a buttload of code refactoring in my future as I continue to expand the capabilities of the engine though. I'll probably end up having to rewrite the whole command system just to make it easier to deal with separating commands from being explicitly unit based.

A critical aspect of a Majesty like game is a menu that builds structures, although not units, from the faction level instead of the unit one.

I was thinking I could even abstract the whole command system from units and have a more abstract class that factions and units inherit from to get commands but somehow I see that causing some weird shit I don't want to deal with. Ah well.

I think I may actually get my Majesty demo up and running before the weekend, I had originally planned two weeks to do it with weekends for libRocket integration.[/spoiler]

Edit:
[spoiler]
Turns out you cannot expand the command system beyond units for a variety of reasons, or rather you could but its just not worth it. Just way too many modifications that could break the code. For this reason I am going to have to create a new type of command, probably similar to trade commands to work with non units. I'm kinda unhappy with this but its unavoidable.

Early commands will probably be a faction build function and maybe some global spell casting type stuff.[/spoiler]

Faction Build Progress, September 30:
[spoiler]
Faction build is not effectively up and running with only some small issues. You cannot see the ghost image that goes red and green based on if you can build in the current spot. I had to work outside of the command code due to having no unit involved and so I was just now able to figure out how to make the structure build where the mouse is. This system was really not meant to be easily extensible :)
It'll probably take me another day or so to work out all the kinks. I still can't convince the describe and subdesc functions to work. Some access error or another.
[/spoiler]

Item Creation, Process Integration, Storage, Commands
[spoiler]
I have done quite a lot of work, after getting the crude faction build command done, on getting the item system to work better. You can now create and store items with commands, the previously resource only processes, and item creation timers.
My next job will be to allow transfers, its partially done already, and then to get items to apply their effects to their holders and display in the item panel. Applying enhancements should be trivial, its applying bonuses to item, resource, and unit creation, as well as effects and abilities that will prove complex. And commands especially should not be to easy to handle. But items granting spells and other commands would be cool so I shall slave away.
[/spoiler]

MoLAoS

#1
http://www.youtube.com/watch?v=KoHTr4m37Bs&feature=youtu.be

New video showing me equipping items to a  warrior. Items can be produced on a timer as well as with the command. They currently provide enhancements only but I am finishing up resistances/damagetypes, item/resource/unit creation on a timer and also cost and storage modifications.

I am a little behind schedule for Majesty because I spent a day fixing the video thing, had to change something so that the game wouldn't crash if you tried to end it, although quitting the whole program was fine, items took a bit longer to handle than I planned and also various real life distractions and a bit of ennui I had to beat.

I am finishing the getLongDesc() function for items, basically the same as the unit one describing all its properties in a tool tip, I am getting as I said before the rest of the item bonuses working, and that will take me probably till Friday morning or night.

Then I will be ready to institute the final part of the game logic for the demo, the Majesty like AI where units will operate at the agent level to do tasks like buy items, build structures, and fight enemies. Although I wasn't programming a lot this past week I did a lot of thinking and planning, so I know exactly how I want to set up the AI.

Most of the item work is done, still need to finish unequip button functions. Got resource/unit/item gen and resource/item processes done. Still need to hook up stuff like resistances/damage bonuses.

I had to entirely rework the item system first because I needed pointers to make the aforementioned generation/process stuff to work properly with timers and then because pointers messed up other things, but its all back to working now.

Work on both the engine itself and my Majesty-like demo proceeds well. Next up, agent level AI and then some GUI polish so the average user can understand what all the new buttons/icons do.

Edit:
resistance and damage type modification by items is now working properly.
this will also help me i think in getting the old load bonus system to function properly.

MoLAoS

I was somewhat distracted last week due to my mother going through a lot of issue with her broken ankle/separated ankle bones and her series of 3, so far, casts, as well as the Cardinals in the NLCS, my home team, and the Tigers in the ALCS and World series, my father lived 40 years in Detroit, as well as some other issues.

As such I know I am somewhat behind my schedule for the release of my Majesty-like demo. I have managed to spend almost all day today and yesterday on it and I will be spending about 20 hours over the next two days as well. I was delayed somewhat while coding due to some idiosyncratic stuff in the GAE map/travel code which I have now resolved. I have almost got the exploring behavior finished and that experience will significantly speed up my work on the hunting and raiding behavior as well as the collecting and purchasing behavior.

I was forced to clear the map of all obstructions to clear up some obfuscating factors about the pathfinding/map code, and I think I will leave it that way in the foreseeable future since its actually true to traditional Majesty maps. This may change far down the road when the mainline new AI is done, but that's like 6 months minimum away.

Currently I have units moving around the map uncovering unexplored lands as well as various guild unit limits without requiring resource based limits and also the item system is functioning properly and post AI-Item integration, basically its only set up currently for player controlled item equips/unequips, it is ready for use as a unit based as opposed to unit type based enhancement.

I am introducing a few twists, for both creative and legal reasons, on the Majesty style game play, which further delays the release but makes the game more interesting, at least in my personal opinion.

In normal Majesty you create guilds with an increasing price per guild built, with no cap excepting that costs and gold totals are limited to 2million gold, with 4 units per guild. Guilds add spells to your spell book ai element, spells are global for temples and local for wizards, while various guilds have special abilities. You only need to upgrade one guild to get abilities.

I as part of my over all campaign to reduce urban sprawl in base builders and also be more realistic, have changed some of this. Guilds can be built, with more expensive base costs, but they get more upgrades. Size upgrades provide more heroes per guild, with the cap based on the hero type.

Each guild type has a mother house which determines the upgrades in capability that that guild can research. Mother house upgrades are quite expensive but they provide research capabilities to all guild branches. Mother houses are built from the faction menu, branches are built from the mother house. Mother houses contain research into new spells or production capabilities and you also need to equip them with facilities. Branch guilds require only facilities to produce anything researched at the mother house.

Guilds possess multiple kinds of mother houses, however branches are cheaper and more efficient to buy than new mother houses, a mother house represents a significant investment and which mother house you pick from each guild type determines your capabilities. It is possible to create multiple mother houses per guild type, however mother houses and their bonuses aren't cheap, and there may be a distance limit so you have to locate different mother houses far away from each other. Branch vs mother house costs mean you want to build many branches of a mother house, well like 3 or 4 to make the costs break even over the hero count, and also upgrade the habitation space of the mother house and each branch in order to make the investment in larger and more valuable mother houses worth it.

Also each guild has vastly different specialties like damage types and behaviors and support/buff skills, so you are better off in most cases going for a new mother house of a guild of an entirely different kind, rather than trying to get all the mother houses of the same guild type.

So having a priestly order, a warrior order, a mage order, and a ranger order is generally better than having 3 mage orders for versatility purposes.

In general there will be many more kinds of units, structures, and items than in the original Majesty. There are more hero types, plus you need to count the varied orders for each type, and possibly even tiers of units per order, for instance the high priestess or archmage may live in the mother house along with subordinates, whereas regular branches have only a high mage and then mages in the lower ranks.

You will also see various structures, an clothier for mages and priests, a tanner for rangers and rogues, and an armorer/blacksmith for warriors and paladins and knights. You will also have enchanters, crafters, alchemists, jewelers and other such things, which Majesty kept at the market, bazaar, and wizards guild.

/wall of text

MoLAoS

This thread will contain any new information about the new game type I am working on getting a solid demo of to show off the new capabilities of my Glest fork.
I'm gonna grab some posts from the main mandate thread and reformat it for this post in the interests of completeness.
This will be the first serious demonstration of new gameplay capabilities, although it lacks any major engine updates.
This is just one of the kinds of totally different game types you can work with, in whole or in part, using Mandate.

Thanks to fabulous number of solid quality models I am one my way to finishing the units for the player faction.

I added a new command that allows buildings to produce structures without a moveskill as if you were using the faction build menu. Except this command properly displays the selected model when placing. I learned enough about why the faction menu only displays the icon and not the model to probably fix that issue later on, which is quite nice.

I am working my way through the guildhalls and mother houses and their resident heroes, 12 of each for 36 units in all, so its taking quite a while. First I supplied basic XMLs with build idle and die, then i added a structure(the modified build command), produce, load, and unload skill and command.

Each guildhall can produce load and unload its heroes and motherhouses at this stage can do all of that and create guildhalls.

Mother houses forts and shops are built from the faction build menu, currently 12 mother houses and 1 for and 5 shops can be built from the menu and properly display build and die in game although they have the default stats which will need to be modified.

Guildhalls are build only from the mother house, firstly to reduce massive clutter of icons on the build menu and secondly to avoid me having to add annoying unit requirements so you can only build them after building the mother house.

Each mother house/guild hall pair comes from the same faction, except wizards, so as to look more cohesive. That system also minimizes art style conflicts since the two buildings match and different guilds each have different styles.

Currently I am using buildings from the elves, dwarves, romans, greeks, magic, tech, undead, moon, imperial and woodsmen factions.

Dark magic is too evil, as are some undead, so they will be used in the demon/monster faction instead. Warlords clashes with the fantasy vibe somewhat, while imperial I only used the keep/castle as an upgrade for the tech castle building. There may be further use of tech and imperial structures with some sort of steampunk related guilds.

Mother houses will eventually provide higher tier heroes beyond the basic hero as well as upgrades. They may also produce an item that the hero will buy if he has money which will allow the use of advanced skills. You would only need one mother house, which is good since they are quite expensive. Guildhalls merely provide extra hero spaces. Both mother houses and guild halls will have space upgrades to load/produce extra heroes.

I will probably need another few days to add the attack skills and then balance unit stats once I finish the basic functions and select models for the heroes, the guildhalls/motherhouses all have models and can be built but not all of them have their commands.

Items/upgrades and the various shops which also sell items will take me maybe 1 or 2 days.

MoLAoS

#4
Reserved for small updates:

Giant Update(November 22nd):
[spoiler]I got a shit load done over the last 2 weeks. I got all of the building shit done. I made significant changes to the new GUI code to fix a few errors in the item system. I've added new capabilities such as units with local storage beginning with their own resources. This allows gold rewards for unit kills.

I modified the level system to only work on exp, however to mimic the original Glest system you can just use exp in place of kills and have all units give 1 exp on death.

The final method for levels I used was a base value per hit, regardless of the hit's resulting effect. However its divided by the units level count +1, so it takes more over time. I also added a count function to levels so that you can specify a rank and a number of levels at once with the same bonus.

My first use of this for my current project involves 40 levels:
Level 0 units are all titled as inductees.
Levels 1-10 are recruits, 11-25 are regulars and levels 26-45 are veterans. The last 3 names are specified per unit, inductee is the default title since levels start at 0. The 3 XML derived titles are for the Defender unit from one of the games Orders.

Each level takes 1000 exp. So 2 hits 3 hits 4 hits 5 hits and so forth increasing per level. When I get to work on my other games I might as a few different ways to calculate exp gain.

I've added several more units and fixed some AI as well. Each Order will have at least 3 units and some have more. The units are basic, advanced and Order leader. For instance the defenders have: Defender, Guardian, Preceptor. They may also have a Bannerman unit if I can find a proper model. Some of the Orders have more than the 2 standard buildings now, standards being Motherhouse and Chapterhouse.

I did a lot more cleaning up and bug squashing and some other features I'm just blanking on, I'm definitely on pace for the previously given mid December release date.[/spoiler]

Units Owned Bug Resolved(November 6th):
[spoiler]Several units didn't have proper XML for the guild hero cap, ie you could hire unlimited heroes.[/spoiler]

Small AI Issue Resolved(November 6th):
[spoiler]So the AI was lagging incredibly for some reason even though it had previously been fine, I think having 51 units lags my ancient 4 year old laptop, I implemented a fix so that AI runs only 5 times a second instead of 40, and only if the unit has no action, so if you are doing a task like killing an enemy it will still select a new attack each time and attack as fast as possible, but if the enemy unit dies it will take 1/8 of a second before that individual unit selects a new target, and the same for other tasks. This appears to have resolved the issue.[/spoiler]

Got All Units/Buildings Working(November 4th):
[spoiler]So I finished getting all the models playable. You can build all the mother houses which build all the guildhalls and both of them can build and load their hero unit. Units can almost all move/stop/attack and their are almost no texture/model errors. I am going to take a well deserved rest and tomorrow morning I will set up all the heros with their AI personalities and goals. Then onward to finishing up the keeps and shops and doing the second tier castle and its morphs and such. And then adding new items and upgrades and then finally balancing the factions.[/spoiler]

MoLAoS

Quote from: Psychedelic_hands on  8 November 2012, 05:08:24
Sounds good. Maybe I missed some threads, but how does the gameplay work? Simple explanation please  ;). Also it is sounding mighty complex, are old glest tech-trees still compatible?

The game I am currently working on is similar to games like Majesty 1 and also somewhat similar to some city simulators.

Effectively you can make buildings, some of which produce items and some which make hero units who can buy those items with wealth gathered from killing monsters. Units are controlled by AI but buildings are under player control.

Building commands mostly involve hiring heroes or adding production facilities. Facilities is basically creating and equipping an item that then allows the building to produce new items which heroes automatically buy if they have money and desire.

Heroes get taxed on money they make at their guild which goes into the guild vault. Shops get gold from heroes buying items. This gold is collected by tax collectors. Some structures produce gold automatically as well like markets and houses.

This is all data based though. If you really wanted you could do something like have heroes collect monster parts and plants and sell them to the alchemist who then makes potions and sells them back. Or mages collect magic crystals from lairs which are then stored in the guild and made into items or upgrades or w/e.

This is just one game I decided I wanted to make using the new capabilities of my GAE fork. My fork should play any GAE mod, well there may be some slight updates you would need to make to an old mod's tech tree. I have been attempting to make most changes use optional child nodes but some don't. That's just an xml problem though.

MoLAoS

For various reasons I couldn't get a lot of work done in the past 3 days, no matter how hard I tried. But I'm back on it now. Mostly doing XML work right now.

Currently I am doing some slight item system modification to make some bugs in the item system, that I noticed when I tried to use the XML, go away. Pretty much done.

I am adding the items to the guilds for things like increased hero housing, new abilities, weapon poisoning and enchanting and what not.

I was thinking of adding a check in the engine to see if its a faction with sim AI so that when you buy an item it equips automatically since there isn't a case where you would make one and not want it to equip in this game type.


MoLAoS

Okay I had some medical issues and my computer kept crashing because its really old.

I have just finished enabling the modification system which will allow buildings to give individual upgrades to units/items of the appropriate type. These possess, optionally, an enhancement, one or more resistance boosts, and one or more damage type boosts. You can also add any number of effects.

You specify modifications like items or units with a folder and an Xml file in the modifications folder. Modifications are saved to the faction type, and they are given to units/buildings to distribute using just the name. So if a mage guild passes out various enchantments you would do something like:

<modifications>
    <modification name="flame_weapon"/>
    <modification name="frost_weapon"/>
    <modification name="stone_weapon"/>
</modifications>

But the actual modification information would be in another file. This has 2 goals. Myself and maybe others may want to specify the same modification to be given out by multiple units. Some of my games require this.

The second reason which is likely more important to the average modder with a less complex game is that it clears a lot of extra lines from the unit XMLs which are massively overcrowded already.

This will be used in this particular game to add over time poison damage or paralyzing poison or burning damage to weapons, these upgrades can be purchased at guilds or shops.

This should be the last major code addition for me to have enabled all the necessary features.

Its all XML from here so the alpha version of the game, because of lack of balance and small number of enemy units, should be out in a week or so.

MoLAoS

Got another butt load of work done. Added the cost application to building from the faction menu. Added some new units and new goals for the AI for some of those new units. Added quite a bit of the gameplay programming.

I ended up making the economy much more complex than Majesty, sort of a hybrid with a city builder.

I still have to add some actual harvested resource types. There will be harvesting for various plants/herbs to create potions. Players will have to locate and defend these plant gathering areas and build a harvest type structure.

There may be some other things like rare metals that will allow production of superior weapons as well. I might make the majority of top tier items require resource collection.

I decided that every guild would have both private and public modifications available and perhaps items as well.

The market not only produces gold on a timer but can build shops which add bonus gold. Shops require various structures like farms and herbalists to build.

Houses cost gold to make and produce population as a static resource. Every other building requires population to build. Houses are built by player decision. Houses also have a householder who repairs the house. Peasants only build houses, they do not repair them in order to allow them to focus on more important tasks. Householders also go out to but things for the house if its fully repaired, this increases the tax collection of the house. They might purchase food from a farm for instance or other materials.

I added several guilds to the game. Guilds also produce goods for householders to purchase, and they allow for new shops in the market. Guilds come with their own set of guards that only protect the guild and they can also buy items which add to taxes. Guilds have workers to make purchases but they don't have their own builders, the castle peasants repair them just like hero guilds.

I am thinking of maybe having all structures have their own repair workers, but im not sure, and its somewhat overpowered, unless they simply have a weak repair rate.

I did intend to have guild motherhouses able to produce special heroes that regular cheaper guilds can't. High priests or commanders of knightly orders and what not. Motherhouses may also have guards.

I decided not to implement global spells from guilds or command flags. So the game is a bit more sim like than Majesty. However some guild upgrades may provide very long range spells that perform spells automatically like heals. Although the engine will eventually have revive powers I decided not to implement any resurrection for the kingdom sim. However, monsters retain gold and possibly items from heroes they kill. Only gold retention is implemented currently.

Quite a lot of what I would like to do is limited by lack of models, ie several types of farms, as well as not wanting to many units in the player faction due to load times and video memory caps. I will see how I can work that out.

I decided to release in December, possibly on or near Christmas, I made a priority list of units and features, I have the major work done, so I can just cut out some of the feature creep if I don't think I'll be ready.

I wouldn't expect Annex level balance among choices, although as a single player game its not too critical. If enough people play and provide feedback that would help.

MoLAoS

#9
Yet another edit:
The code changes are finally working although its gonna be a huge pain to reformat my 75 unit XML files. I blew an extra 6 hours on it because I was a dumbass and didn't realize that the problem was a pointer value set to 0. Spent so much time changing classes and messing around before I noticed.

Edit: Whoops changed my mind. I changed the loading code since I was trying to allow items to hold commands which they then pass to units that equip them. I wanted to remove a lot of work also and remove duplicate code. So item type and unit type inherit from creatable type now which changes the loading XML a little bit. On the plus side upgrades and maybe some other classes will also inherit from this class and gain its capabilities as well. Even effects/emanations might be able to inherit from this class. Should open up some fun possibilities.

I've fleshed out various aspects of the item and unit system while working on my current game project.

At the point at which I release the game I am working on I will consider the engine to be in its final Alpha stage.
The reason that it will still be Alpha is that it won't contain the new Rocket GUI or the upgraded graphics engine.

Just as a note the final Alpha will be the last version to maintain legacy syntax. Most GAE mods are quite old and no one uses it much because the plebs only care about multi player. It takes a lot of extra work to maintain all the outdated loading syntax. I'll be moving a bunch of stuff around and adding documentation to the code and shrinking the number of lines per file. The unit file has something like 3500 lines of code and growing for instance. Also a lot of the unit type and unit code is duplicated in the item type and item code, so I'll be moving that to another file.

Basically the old upgrade and enhancement and level syntax will all be gone. Aside from the removal of legacy loading code all the new stats and features are optional in the XML.

I play a lot of games for play testing purposes, so most of the changes don't have bug problems. However I wouldn't go so far as to call it a stable release. You definitely cannot use even GAE's rudimentary multiplayer. Mandate won't support multiplayer at any point as far as I am concerned. If I wanted that I would play Starcraft 2.

December 25 is the release date for the semi stable engine release and the game release. Of course the source code is all available at the GitHub page at any time. I usually update it 3-5 times a week from my local repo.

MoLAoS

I've gotten all the units onto the new XML and added several more.

I decided to add an alternate tech up path to get the player to make some tough decisions.

You can now morph the castle into a keep which allows you to produce some new units and structures with unique, in this particular game, they are pretty common in standard RTS, capabilities. The keep can recruit up to 8 Royal Guards, possibly more with facility purchases. This area will also be where the layered upgrades work. The normal units function as individuals so type based upgrades won't work, but these units can get them. They are controlled like traditional RTS units such as in Glest.

The Keep also constructs Guard Barracks which produce City Guards. CGs are better than regular Guards from the Guard Houses but weaker than Royal Guards. The Barracks have a variety of layered upgrades and capacity increases. You can get some decent numbers of Guards.

Barracks also produce City Archers which follow the same rules. They have a special ability. A special Guard Tower can be constructed from the Keep which is slightly more powerful than a Guard House. However it doesn't come with the 2 free guards. It has the Load Bonus ability I added to the game whereby loading a designated unit with the Garrison Command(copied off the load command) gives it some sort of boost. In this case City Archers increase the attack speed of the structure to simulate more defenders. This protects the defenders and make them a little more powerful than normal.

Palace Guards, City Guards, and City Archers are all player controllable. You can man different Guard Towers depending on where you are being attacks and move guards to protect important buildings during attacks.

City units are both weaker and cheaper than Order members. You can get more without capacity increases and control them directly but their structures are comparatively expensive. Further more Order houses generally require 10 or less population while the Keep and the Barracks require 20 or more because City units are drawn directly from your population theme wise and this is reflected in the mechanics.

Furthermore having to micro units takes away from management and strategic decision time. The benefits of City units are offset by their opportunity cost.

Now that I've got that part down I need to do some serious economics work. Although the Order of Defenders is mostly done I think I should get the economy down with the various resources and items before I dig into the combat. And honestly the economic content is the more original and interesting aspect plus it ties into the items that Order units purchase. Potions and weapons and magic jewelry and crap.

Plus the economics are what generate the reasons for combat. As the monsters attacks and raids increase over time its necessary to secure the resource points to get the new items and consumables and what not to keep your units up to speed. Resources do some other stuff as well. I hadn't initially planned to use actual resource models but it just happened. Harvestable resources just seemed like a good way to force expansion and land control. In Majesty you just had one settlement and abused flags.

MoLAoS

#11
I was digging around the web for some resource and units icons and I managed to locate a series of about 100 free resource icons that appear to be CC licensed. This is going to save me weeks of designing my own icons which would end up pretty inferior to these professional ones.

Edit:
The designer got back to me super fast saying just stick his name in the art credits. Its so hard to find a large set of icons without a super cartoony art style so this is pretty great for me. MagiTech + mod factions do have a butt load of icons but since the engine was initially Warcraft based there are like 10 resource icons total from all the factions I downloaded.

A link to an image with most of them displayed is here:
http://www.cartographersguild.com/mapping-elements/8270-natural-resources-icons-graphics-4.html#post96734

They will probably cover 90% of my needs, mostly the inanimate ones, the animals art style is not aligned with my preferences, but luckily game doesnt have any animals as is currently designed.

MoLAoS

I have managed to figure out the map editor enough to modify the number of resources available to place. My current game needs at least 10. I may be able to fob some others off on the tile set for herbs and what not, or I may need to expand the count again.

In any case I expect that when I get back to enginey work post release of my current game project I'll be making some significant map_editor modifications as well. I had some fun modding the editor, it was just so easy and there where no hitches and uncomplicated changes for important effect make me quit happy :P

MoLAoS

I finished quite a bit of work on the livestock system of the game. I did the live stock farm unit and its associated resources and items.

Each farm has space for 4 livestock pens. You can use any combination of livestock: Cows Pigs Sheep Goats

Each kind of livestock has its own products that it creates:
Cows: Leather, Milk, Meat
Sheep: Wool, Meat
Goats: Meat, Milk
Pig: Meat

Although the pig only has one type of product it is much cheaper, breeds faster, can have more per farm and so forth. Its per animal meat production is the lowest however. Pigs give a higher total meat production but do lack secondary products. Goats provide less meat than pigs but provide cheap and plentiful milk. Sheep provide the least meat if you max out herds but provide valuable wool for various items. Cows provide the second least meat with maxed herds but provide valuable leather for armor and other things as well as good milk production.

The farm requires pens and also processing sheds like the milking shed the shearing shed and the 4 butchers sheds, one for each type. The reason that butcher sheds are separate per animal is so that you only kill animals you want to kill for meat or leather. The wool and milking processes take advantage of the new consumed indicator. Ie they don't consume your animal resources whereas meat obviously does.

There may be a use for other animal products like dung for fertilizer and possibly animal blood for possible vampiric creatures/units and/or for magic rituals of some orders.

There may also be some interaction with the crop farms in terms of animal feed and of course needing both wheat and milk to create bread products. There will be both dairies that buy milk and sell cheese and possibly other products to townsfolk as well as bakers which make bread products of various kinds for sale. Food products mostly get sold to townsfolk so that you can tax shops and guilds for money. Further because guilds and farms have the same local economy system as Orders they need to earn money to expand.

I should finish the crop farm system today and create the market stalls for dairy and butcher and so forth. There may or may not be vegetables. Currently I have only done grains.

MoLAoS

Generating a release version so I can use a recording program.

The video will appear in the first post as soon as youtube ends it multi hour slow as molasses upload.

I am going to make a video show me recruiting some peasants, building a market and a livestock farm and then buying 2 cattle pens and a milking shed plus four additional cows.

I modified the item command so that it functions as a superior GAE GenerateCommandType command with which to exchange one resource, in this case gold, for another resource or even varied other resources, in this case a cow, a goat, a pig, or a sheep. Cows for the demonstration. If the item in question has its type tag as stock it will not produce an item but merely apply the costs. -1 Cow locally and 50 gold locally in the case of the Cow item.

You will see the cattle pen breed cows over time and the milk shed process cows, using the new consume tag set to false which means the cows won't be removed, to generate the milk resource.

I will then build a quartermaster at the market who will search for a building that possesses the resources which it likes to buy, as defined by the new resource stores xml tag which specifies and arbitrary number of resources to attempt to buy, by type and amount. It will determine that since the market is a shop and the livestock farm is a guildhall that it can purchase the resource milk which the farm has and which it wants to buy.

The Quartermaster will then exchange gold from the Market's local storage for Milk at the Livestock Farm's local storage at the price defined in the faction XML for the Kingdom faction, in this case 3 gold. So the Market will transfer 120 gold to the Livestock Farm to buy all the milk it has, 40 per 30 seconds with one Milk Shed and at least 4 cows since the process defined in the Milk Shed trades 3 Cows for 10 Milk not consuming the cows and it cycles up to 4 times, the maximum productivity of the shed is thus 40 Milk if the Livestock Farm has at least 12 Cows.

Following the purchase by the Market the nearby Houses will attempt to buy the Milk requiring at least 10 to buy and having a maximum desire of 25 Milk stored at once.

Houses generate an amount of Wealth every 30 seconds half of which can be taken by Tax Collectors from the Castle or Keep. The remaining Wealth can be used by the House to purchase Goods, resources, in this case Milk, at the going price, in this case 3 gold.

Technically the Market neither makes nor loses wealth in purchasing Goods, since it buys at the same cost as it sells. The actual money which is collected from the Market is generated by the Houses.

There may later be an override cost so that the farm sells at say 3 and the Dairy guild buys at 4, and then makes cheese which it sells for 6 and which houses buy for 6. This is more realistic and would make for a more interesting economy. I have so much work to do however that this will have to wait.

MoLAoS

#15
I have added a lot of functionality to processes in order to make it more useful. I mean resource processing with costs and outputs.

Previously you could specify a cost and a number of out puts for the cost, as well as a timer and specify if it went into local or faction storage.

I have added several things.

You can specify a count where it checks the available resources and repeats the process if you have available resources:

Here is an example:
    <processing>
      <processes>
        <process timer="30" count="1" scope="local"> happens every 30 seconds, limit of one time.
          <costs>
            <cost name="corn" consume="false" amount="0"/> cost of 0 corn normally, the bonus is the part i needed a process for
          </costs>
          <bonuses> bonus is an optional cost that adds value if met
            <cost cost-name="manure" prod-name="corn" count="5" consume="true" amount="2" plus="20" multiply="0"/>
          </bonuses> can use up to 10 manure, needs at least 2, gives 20 extra corn per 2 manure does not have a multiplier currently
          <products>
            <product name="corn" amount="100"/>
          </products>
        </process>
      </processes>
    </processing>

    <processing>
        <processes>
          <process timer="30" count="4" scope="local"> happens every 30 seconds, can happen 4 times if you have more cows
            <costs>
              <cost name="cow" amount="8" consume="false"/> consume is false the resource cost does not reduce your stored cows
            </costs>
            <products>
              <product name="cow" amount="1"/> produces 1 new cow
            </products>
          </process>
          <process timer="30" count="8" scope="local"> triggers 8 times triggers every 30 seconds
            <costs>
              <cost name="cow" amount="2" consume="false"/> costs 2 cows per manure, since we don't want too much to exist
            </costs>
            <products>
              <product name="manure" amount="1"/> produces one manure per run, to a max of 8 based on the count tag
            </products>
          </process>
        </processes>
    </processing>

    <processing>
        <processes>
          <process timer="30" count="2" scope="local">triggers twice, otherwise need more sheds, 30 second timer
            <costs>
              <cost name="cow" consume="true" amount="1"/> costs 1 cow, note that consume is set to true, you lose the cow
            </costs>
            <products>
              <product name="meat" amount="5"/> produces 5 meat
            </products>
          </process>
        </processes>
    </processing>

MoLAoS

Today I have done a bit of code cleanup, mostly in the UI. I fixed some config files and added my newer displays to the position files so that you can save their positions. I fiddled with some other stuff as well.

I think I might take a break from the game demo to add some more code to heroes.

Basically what has been described previously such as the special Exp, the 3 spheres of experience, new skills and single stat boosts and so forth.

However I think I will finish up some XML editing for the economy first, I have most of the guilds, the farms, the market, houses, the castle and the keep, so I need to move up to the next level, shops. This level has the blacksmith, alchemist, enchanters and other such things.

MoLAoS

I spent a lot of time today adding new functions to the item system so that certain aspects were more usable in my game.

There is a new item store section of UnitType so you can cap how many items of a given type can be stored. This had previously been just a total item cap but sadly this was a problem because units/buildings who need to generate lots of items for sale would easily exceed a limit and they keep generating old classes of items even after you get better ones. Sometimes you want that and sometimes you don't. The individual cap alleviates that although later you may be able to toggle processes and item creation on and off.

Game wise I spent quite a bit of time creating the 12 tiers of swords and cuirass that can be bought to replace a units starting "wood" items. There is one level for each of the metal ores found in the game. However later bars of metal will require both iron and copper as well as their main metal type. Copper for copper, iron for iron, coal and iron for steel, lead and iron and coal for leaded armor, silver iron and coal for silvered, gold iron and coal and copper for guilded and so forth. This makes it harder to tech up, you can't really skip levels, and it makes older ores like copper and iron and steel retain some value.

Currently the item classes to be included are:
sword/axe/spear/lance
bow/crossbow/longbow
cuirass
helmet/helm
pauldrons
guantlets/braces
greaves
boots

Each item will have 11 tiers of metal and then mages will use cloth items with wire and adornments of various metal, archers and some special classes can have leather with wire and banding and other attachments to class up.

Although there are over 50 resources and hundreds of items it appears that skills, and thus models, are the bottleneck in loading and memory, so this won't affect load times or ram usage significantly.

I do believe that the item system is finally totally fleshed out. The only significant change that may remain is how to assign models to skills/commands learned from items. Its possible that items will not contain these but stop at particle systems, and that animations will be stored in units only and special code will connect an animation to a skill as its learned from the item when the item is equipped.

Once I complete the addition of the hundred or so remaining items and doing the bmps, basically a standard image is used and recolored with GIMP per item class, I will be pretty much done with economics.

Although I originally hoped for herbs to be stored on maps using the same system as resources it appears that I may have to just use upgrades/items to imitate resources which will be unlocked as you level the herbalist and alchemist's guild. I simply lack the modelling ability to make new models for plants before my deadline.

Consumable items, mostly potions WILL be in the alpha release however and consumable items already function properly. Herbs were only part of the resource requirements.

MoLAoS

Units can now get an enhancement for both day and night to alter their stats based on the time of day. At some point the system will probably support changes at dawn, noon, dusk and midnight.

Later updates will support morphing, new skill options and changes to the various stats I added to the game like damage types and resistances based on the times of day.

I'm gonna look into adding some similar functionality for terrain and being near objects, much like the buidings being more or less powerful near the proper map objects.

MoLAoS

I added the bonus to a building's capabilities based on its proximity to a given map object. At some future point there will be the option to gain bonuses from multiple object types or multiple bonuses from multiple objects of the same type. There will also be a proximity test for other building types. I've just bought Sacrifice so I'll be busy for several hours on that after this.

MoLAoS

I have been doing a lot of code reorganization lately to streamline the change progress and make it much easier to understand.
The first thing I did was add the Statistics class as a base class for creatable or producible types.

Statistics inherits from EnhancementType but incorporates various other stats I've added like resistances and damage types and other things.
The computeTotalUpgrade function has been greatly simplified by using calls to Statistics::sum instead of EnhancementType::sum and a bunch of loops for resistances. I've reduced having the same code copied in multiple areas with this as well.

I am also moving lifesteal, manasteal/burn, and other on hit affects into this new class as optional stats. I am removing the attack-strength stat and the armor-type stat from EnhancementType/UnitStats as well. They are being replaced by the resistance/damage type system.

You can use a sort of global armor type by using an item and loading it as a starting item on appropriate units. Resistances exist on both item types and unit types.

MoLAoS

Okay I finally worked out and got start on the other changes to the GUI besides items.

I moved resource storage out of the tool tip into the item display using icons, and now I'm moving processes and resource and unit and item creation out of the tool tip cause it just doesn't work there. Too much stuff.

I am gonna make a production panel for those 4 things using an icon system similar to the resource storage one.

Each process or creation will get its own special icon and each icon will have its own tool tip describing the process or creation action. I also figured out how to use buttons to select which extra panel besides main display is visible. I also move the unit name in the display panel so that the top row can hold the buttons, you still have the portrait with the normal longer tool tip, but then next to it in single selection you get up to 5 other buttons for other panels.

They should be:
Stats
Items
Stored Resources
Process and Creation
Carried Units

Resources might be pushed to a new panel of its own since it doesn't really fit into items per say, and it allows more space.
Process and Creation will have 4 sections, one for each of the 4 creation options.
Carried units will hold carried and garrisoned units, as well as holding units carried by the faction that that unit can unload.
Items will be the same inventory equipment thing it is currently.

Stored Resources is an optional panel I'm not sure if I'll do. Basically moves stored resource icons and values to a new panel where it can be more customized for the purpose and free up item panel space.

I've got the button section set up and the hide and display stuff. I just need to set up the actual panels as to what and how they show stuff.

MoLAoS

#22
Edit:
Finished the Production Panel for the GUI. Headed ever onwards to the next panel, probably the carried unit panel. That section really gets in the way on the display panel, I can't even display all 3 types of carrying cause of space limitations. Then probably the stats panel and maybe the resource panel last.

Features I've already done or ones I have yet to do?

You could theoretically port over anything I did already or even that GAE did. Its a matter of having a programmer with time and the desire to do so which historically MegaGlest has not had. Either the devs are too busy with their real lives or they disagree that features are necessary enough to put on the to do list.

MoLAoS

#23
Update:
I have finally after 3 days and lots of me being a moron and lots of the original Glest code being weird, managed to get the game to load perfectly and initiate units properly with my new version of EnhancementType. This makes the Xml both more manipulable and the source code much easier to understand and requiring fewer steps to modify.

I am currently porting the XML changes from my test faction to my main faction since the main one. It should be the last major Xml change, which is great because modifying so many Xml files is crazy annoying.

Before I went to do the final GUI panel I decided to do yet another rewrite of the basic unit stat code and the related code in skill and command types. I want to reduce the changes I would need to make to multiple files to add or remove things. I also wanted to finally finish certain aspects of the hero/mage/leader system.

I split up unit stats and enhancement type into smaller groups for various purposes. For instance the attack related values that can also go on attack skill types and other things. This will also help for me to add various other value to the attack section and stuff to other sections. I am adding separate repair build and production values for various unit types for instance.

For the RPG aspects I am adding 2 attack values that modify magical and physical attacks instead of attack strength adding to all skills. I am also adding skill points and other stuff. If you remember all those varied leveling/experience systems we talked about those are finally getting fleshed out. You can either buy things directly from experience or you get skill points and/or level for experience.

MoLAoS

#24
Update 2:
I reversed some changes because it was just not worth it to store attack range and attack speed or attack skills in the attack stats class. But I still added the optional tags stuff and the generic skill things. You can leave out certain tags that would be set to the default value.

I think I will try and work on some more game play related stuff now. Take a break from boring technical crap.

Update:
I finally got all the way through the main effort of the refactor. I'm just cleaning up a few obscure bugs from the change and fixing some stuff because the system wasn't really meant to be extended this way. I expect to be done before I go to sleep tonight. Stop, Move, and Die however are all functioning properly as are some others.

I decided to blow another day or 2 and do a buttload of work on rewriting the skill type code. I am moving a bunch of stuff from regular skill type to the more appropriate place. The source should be much more readable and the capabilities of skills to utilize new features will be greatly increased.

I am setting up skills to take various unit resources as a cost:
Energy/Mana
Health
Stamina
Shield points

Skills should be able to cost local resources and/or items as well. A unit can generate a ammunition and incendiaries by creating items on a timer up to a cap, and then they can consume those items to use a skill. So bullets or grenades and such, or crossbow bolts of various metals and/or with various special effects, like fire arrows or poisoned ones. I believe the code will grab an effect from the item and apply it to the target.