Author Topic: Mandate Update Thread  (Read 18720 times)

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Mandate Update Thread
« on: 2 September 2012, 03:39:38 »
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
Mandate related item system demo:
https://www.youtube.com/watch?v=KoHTr4m37Bs

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:
(click to show/hide)

Partially Completed:
(click to show/hide)

Semi-Complete List Of Intended Features:
(click to show/hide)

September 1st:
(click to show/hide)

September 20th:
(click to show/hide)

Update on Majesty stuff:
(click to show/hide)

September 27th, 2012
(click to show/hide)

Edit:
(click to show/hide)

Faction Build Progress, September 30:
(click to show/hide)

Item Creation, Process Integration, Storage, Commands
(click to show/hide)
« Last Edit: 25 May 2013, 16:02:22 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Update Thread
« Reply #1 on: 17 October 2012, 16:27:58 »
https://www.youtube.com/watch?v=KoHTr4m37Bs

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.
« Last Edit: 19 October 2012, 16:47:11 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Update Thread (Majesty-like)
« Reply #2 on: 26 October 2012, 05:18:06 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Mandate Engine: Fantasy Kingdom Simulator
« Reply #3 on: 5 November 2012, 04:34:08 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Engine: Fantasy Kingdom Simulator
« Reply #4 on: 5 November 2012, 06:58:12 »
Reserved for small updates:

Giant Update(November 22nd):
(click to show/hide)

Units Owned Bug Resolved(November 6th):
(click to show/hide)

Small AI Issue Resolved(November 6th):
(click to show/hide)

Got All Units/Buildings Working(November 4th):
(click to show/hide)
« Last Edit: 22 November 2012, 12:15:26 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Engine: Fantasy Kingdom Simulator
« Reply #5 on: 8 November 2012, 05:31:22 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Engine: Fantasy Kingdom Simulator
« Reply #6 on: 10 November 2012, 23:00:26 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Engine: Fantasy Kingdom Simulator
« Reply #7 on: 14 November 2012, 00:11:00 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Engine: Fantasy Kingdom Simulator
« Reply #8 on: 19 November 2012, 10:11:02 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Engine Stuff
« Reply #9 on: 24 November 2012, 23:45:38 »
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.
« Last Edit: 26 November 2012, 05:56:41 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Fantasy Kingdom Simulator Updates
« Reply #10 on: 28 November 2012, 12:46:41 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate: FKS Art Assets
« Reply #11 on: 29 November 2012, 09:29:38 »
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.
« Last Edit: 29 November 2012, 13:03:56 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Map Editor Updates
« Reply #12 on: 1 December 2012, 03:49:33 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
ME: Fantasy Kingdom: Livestock
« Reply #13 on: 9 December 2012, 14:46:14 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Engine: Fantasy Kingdom Simulator
« Reply #14 on: 16 December 2012, 15:46:15 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Mandate: Extending Processes
« Reply #15 on: 18 December 2012, 17:53:29 »
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>
« Last Edit: 18 December 2012, 17:59:58 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Code Clean Up
« Reply #16 on: 20 December 2012, 17:03:58 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Update Thread
« Reply #17 on: 21 December 2012, 03:32:16 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Day Time Based Power
« Reply #18 on: 2 January 2013, 05:48:43 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
ME Update: Location Based Bonus
« Reply #19 on: 3 January 2013, 05:36:07 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
ME Code Clean Up
« Reply #20 on: 4 January 2013, 03:49:32 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
ME GUI Changes
« Reply #21 on: 5 January 2013, 22:54:07 »
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

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
Re: Mandate Update Thread
« Reply #22 on: 6 January 2013, 03:42:06 »
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.
« Last Edit: 6 January 2013, 07:55:54 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
(Update)EnhancementType Changes
« Reply #23 on: 9 January 2013, 03:32:01 »
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.
« Last Edit: 11 January 2013, 02:07:45 by MoLAoS »

MoLAoS

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 433
    • View Profile
(Update 2)ME: SkillType Refactor
« Reply #24 on: 11 January 2013, 07:30:20 »
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.

« Last Edit: 15 January 2013, 02:47:44 by MoLAoS »