View Full Version : Mod UnitGen - Random nations with procedural sprites!
elmokki
February 7th, 2012, 07:03 PM
The other forum has the same thread but I figured I should probably post this here too:
http://koti.kapsi.fi/elmokki/dom3/unitgen/mahamia.png
Mahamia is a nation which's army relies on a fairly unflexible infantry and skirmish tactics along with support from boar riding cavalry. The infantry is armed with bucklers and short swords or falchions, and the lightest infantry variant also carries a harpoon. The pinnacle of this infantry lineup is the Mahamian elite guard - moderately armed soldiers with exceptional skills. Cavalry support for the main army comes in two ways. The Mahamian light cavalry does not carry a lance, but instead fights with a sword and a harpoon. The Mahamian lancers are more heavily armored and carries a lance along with a falchion. Mahamians do not use bows, as they find a crushing charge more effective.
The Corrupted Keepers of Mahamia are mages skilled in blood magic, but they also dabble in air and nature magics and also have divine authority. All mages of their order are sacred. The religious authority in Mahamia is held by Mahamian bishops alongside the Corrupted Keepers.
Mahamia was generated randomly, this description, sadly, not yet though. I'm going to work on those soonish.
...yeah, so, I suppose some of you know what UnitGen is. It began as a software that makes random units out of unit parts - generally fairly decent looking sprites all in all. Natural next step has been nation generation. After surprisingly many manhours and a few months UnitGen is now essentially feature complete. It doesn't mean there won't be tweaks and major code and content additions, it just means it generates very playable nations comparable (apart from descriptions at the moment) to the base Dominions 3 nations.
Features!
- All graphics used are generated from parts and colored to be as unique as possible!
- 7 races and more coming: humans, black humans, hoburgs, caelians, lizards, tengus and abysians
- Complete rosters of chariots, infantry, archers, crossbowmen and/or cavalry of various types
- Sacreds ranging from slightly buffed light cavalry to heavy infantry with flaming spears and harpoons with ability to turn into fire elementals upon death.
- Very varying setups of mages. A nation may have 3 to 7 or so mages which are quite logically structured to seem like mages of one nation and may or may not have awesome special abilities ranging from fairly standard stuff like forge bonuses or glamour to stuff like being able to turn into a devil.
- Nations themselves may get features like cheaper buildings, blood sacrifice, abnormal temperature settings or reanimation.
- Along with the base set of pretenders every nation in the game has available, 5-10 extra pretenders are generated with random picks heavily weighed on the magic paths your nation has.
- Works on Windows, MacOs and Linux... with luck it might work even on something stranger.
You can get test builds I occasionally bother to release from http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/. The naming is formatted unitgen_dd_mm_yy.zip.
You can also find some level of documentation for editing the files at http://koti.kapsi.fi/~elmokki/dom3/unitgen/how_to_make_content.txt (included in 18.7 and newer releases too) but I recommend #dominions at irc.gamesurge.net since it isn't too throughout.
elmokki
February 7th, 2012, 08:18 PM
Most of the work today was towards unit generation and as such isn't easily showable, but I did also finally make nation naming files race specific and made a flag generator. Currently flags are totally random, but in the future I plan to make them somewhat dependant on nation specifics.
http://nikita.tnnet.fi/~elmokki/unitgen/unitgen_flags.png
elmokki
February 8th, 2012, 10:14 AM
http://nikita.tnnet.fi/~elmokki/unitgen/blueguard.png
New mount sprite since I was bored but couldn't be arsed to code!
elmokki
February 8th, 2012, 10:55 AM
8th of Feb version up.
Changes from last version:
- Race specific nation naming
- Rewritten unit naming to make somewhat more sense (still needs minor tweaking on cavalry though)
- Improved flag generation
- Offhand weapons and bonus weapons should generate correctly
- "Attack sprites" - not really, but a placeholder that should be fine for now.
elmokki
February 9th, 2012, 05:19 PM
http://nikita.tnnet.fi/~elmokki/unitgen/maag.png
Army of a nation called Maag
elmokki
February 13th, 2012, 06:43 AM
The new version contains a sprite generator with a basic GUI: http://nikita.tnnet.fi/~elmokki/unitgen/de...gen_13_2_12.zip (http://nikita.tnnet.fi/~elmokki/unitgen/dev/unitgen_13_2_12.zip) contains spritegen.jar in addition to unitgen.jar. It does not take into account item dependencies and probably never will. So basically if you set a cloak front you have to set the back manually and if you set full plate as armor you have to set suitable pants too. Also in some cases mounted pose graphics will be misaligned until you select a mount - this just is how the program works. Mounted poses are always supposed to have a mount anyway.
Making this was probably a good idea. With an easy way to see how a sprite looks some people might get interested in implementing new races or items. Also if someone wants, renaming all those items with numbers as their name would be nice. Also I found out a syntax error in armor files thanks to this! Making a flag generator might be something I'll do at some point. It'll be a lot quicker to do since that part is a lot simpler.
Unitgen itself has some changes too, but nothing major. I've been too hooked on Crusader Kings 2 to bother programming much.
http://nikita.tnnet.fi/~elmokki/unitgen/spritegen.png
Here's a screenshot.
elmokki
February 13th, 2012, 07:09 AM
Bigger sprites caused problems, fixed this and reuploaded. It caused a minor UI change too.
EDIT: Thanks to retarded 30min post edit limit I'll have to clarify on this post what the lack of dependency handling causes with mounted units in some cases:
The most visible thing with this is some mounts and weapons on them. Overlays are supposed to make some weapons and things seem like they are behind the mount and now they aren't selected automatically. So basically if your mounted unit looks problematic you can probably get it look better by selecting the correct overlay (and absolutely terrible with wrong overlay).
Especially the spider and the pegasus mounts need their overlay.
legowarrior
February 13th, 2012, 11:49 AM
This is cool
elmokki
February 19th, 2012, 05:23 AM
After a couple of days of doing nothing for UnitGen I've:
- Refined cavalry generation somewhat. You can now specify precise maximum and minimum armor (chest armor right now) for a mount type. This was done since the generic "light", "heavy", "medium" tags were a bit lacking. Some units just need a custom range of possible riders.
- Added nation tag system. Each nation gets a couple of tags - maximum of 3, but usually 0 or 1. These tags are stuff that range from very influencing to very minor. Currently I've added a preliminary list of some tags and they'll include stuff like increased chance of stealthy units, increased chance of dualwielding, nation wide +1 mr, nation wide +1 str, nation wide light cold resistance, nation wide light fire resistance, advanced, primitive, increased chance of cavalry. Tags have opposite tags that can't be chosen together with them.
Currently only two things work regarding these though. Dual wield chance may drastically increase with suitable tags or slightly decrease if you have advanced. Dual wield generation mechanics are going to change sooner or later which'll make the effect of this more major. Tags also affect item selection when items have tags defined for them - currently that's just primitive and advanced.
The effect of this item selection is currently that suitable items for your tags (ie primitive items for primitive nations or advanced ones for advanced nations) get a double chance of being selected for a nation and the opposite items (ie advanced items for primitive nations) for your nation get a fourth of the base chance.
elmokki
February 19th, 2012, 04:37 PM
Today I "fixed" nation naming, ie made four consonants in a row and three same letters in a row impossible.
I also worked on militia/start unit selection, which is working fairly well right now, but we'll see how much work it'll need once I get to trimming nation rosters to manageable sizes, which'll be soon.
And of course as always tweaked item data. Also added Chakrams (actually got a graphic) and Sticks and stones (no graphic)
There's a 19th of February version up. I know the bonus weapons give names to units far too often and that crossbows/shortbows/chakrams as seocndary weapons should be rarer. This'll get fixed eventually.
elmokki
February 19th, 2012, 06:38 PM
kianduatha gave an awesome idea for naming units. Now apart from some very long nation names instead of "heavy archer", "javelineer", "spearman", "infantry", "lancer" you get stuff like (nation names bolded):
Haakagian Archer
Uzumish Chariot
Vaainine Heavy Infantry
Tenchiide Lancer
Zasisic Crossbowman
Gomirian Falchioneer
Zekkan Axe Thrower
Gomnagomish Heavy Serpent Cavalry
In the future I might make just the elites get this kind of naming. We'll see.
elmokki
February 22nd, 2012, 08:53 PM
23th of Feb version up.
I worked quite a bit on filters that go through units and give them stuff if they fulfill the requirements. Currently there's nothing very noticeable with this since filters are handling just bonus weapon and dual wielding generation, but those two have both changed.
Dual wielding can now convert any unit to a dualwielder instead of turning shields to onehanded weapons. This makes the 5% dual wield chance higher in effect and I'll have to consider lowering it if it generates dual wielders for nations without primitive / dualwielding / berserking tags too often.
Bonus ranged weapon generation algorithm has been changed. Nations posses a bonus weapon affinity now, which is from 0 to 1. Currently it's given completely randomly, but I'm fairly sure I'll make some tags affect this as well as possibly giving extra affinity to such bonus ranged weapons that suit the national tags. Bonus weapon affinity determines two things. How heavy units can get bonus weapons and what weapon-shield configurations can get them. Currently with an affinity of 1 you'll probably see tons of bonus weapons, but the heaviest possible units still won't get them. Also some bonus weapons (chakrams and sticks & stones) have additional limitations and standards ignore the affinity completely, but have a limit in generateability. This feature is something that will recieve tweaks at some point since it still is far from perfect.
I've also worked on trimming nation unit rosters since obviously every human nation won't have 4 ranged, 1 chariot, 4-9 infantry and 2-4 horsemen. Currently nations get 8 to 13 units if I recall correctly. This'll get heavy tweaks - currently it's a very rough algorithm, but in general generates fairly good lineups.
Elitefying some units is pretty much an obvious next step since that is heavily tied with filters. That does need a bit of extra work compared to just adding filters though.
shatner
February 23rd, 2012, 12:29 AM
Those are some really cool developments elmokki. This creation of yours is getting pretty snazzy and I, along with many others, I'm sure, look forward to its continued refinement.
elmokki
February 24th, 2012, 07:08 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/elitesandmages.png
Two major features shown, neither is even nearly ready enough for me to bother update the dev version.
- Commanders get ran by the elitefying filter at strength 2, giving them commandery stats and looks Sometimes there just aren't suitable helmets though, but I plan to add some light ones and a lizard full helmet one to remedy that. The tower shields there are coincidence.
- Mage generator can generate 3 tiers of mage sprites. Still needs tweaking, but results aren't bad at all right now most of the time. I do see the graphic bug on the lower row of mages, it'll get fixed.
elmokki
February 25th, 2012, 07:53 PM
Today I added nets and poison darts as bonus weapons, rare ones though. Net required a minor feature addition since it's a bonus weapon and should be generated as such but it replaces a shield. I saw some net cavalry and first though about removing nets from mounted units and chariots, but then again if cavalry sacrifices a shield for a net, then that's what happens. Twohanders can use net without any penalties, so it's definitely a better weapon for them. Them getting it is fairly rare though.
I also reworked Randomocalypse site name generation files and code so that it now sometimes shows both primary and secondary path of a site (if there are such) in the name and it now supports dual-path names too.
And mage generation got some work too in terms of restructuring code. I get some good looking mage setups now in terms of sprites but there's no code for magic paths yet.
elmokki
February 26th, 2012, 01:35 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_26_2_12-v2.zip
I might release a v3 today if I feel productive. This includes magic paths for primary mages and one kind of secondary mage magic path set that's duplicated to every single secondary mage at the moment.
Also an easy .exe file for windows users.
elmokki
February 26th, 2012, 05:45 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_26_2_12_v3.zip
18 minutes before it would've been 27_2_12.
It actually REMOVES secondary mage paths as they were bugged as hell. It has a complete rewrite of primary mage paths.
elmokki
February 26th, 2012, 06:45 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_27_2_12.zip
Derp, now it should finally be bug free. Also generates all possible primary mages of certain path set per nation.
elmokki
February 26th, 2012, 07:21 PM
Primary mages can be now generated with following patterns for magic:
3-3-?
3-2-1-?
3-2-?
3-1-1-?
3-1-2?
3-2? (linked)
3-2?
3-?
2-2-2? (linked)
2-2-2?
2-1-2? (linked)
2-1-1-2? (linked)
2-1-1-2?
2-1-1-1?
2-1-1-1-?
2-3? (linked)
1-3? (linked)
1-1-1-2? (not in 27-2-12 version)
In general randoms are such that only one path can reach level 4 and none of the paths can reach level 5. Exceptions to this is the linked 2-2-2? which allows both of the two paths to be level 4. Current version generates one of every setup for test, but in the future some will be rarer than the others.
I just went through secondaries and tertiaries of MA and I believe this is a fairly comprehensive list of levels possible for secondaries and tertiaries. Do tell if you can think of one more to these or primaries! One setup is listed only once even if it is available for multiple nations.
Sec:
1-1 - MA Tien'chi - caponly primary (7 picks)
2-1-1 - MA Pythium - caponly primary (7 picks)
1-2? - MA Man - caponly primary (6 picks)
2-1 - MA Marignon - caponly primary (6 picks)
2-1-? - MA Ashdod - caponly primary (3 picks), special
2-1-1-? - MA MAchaka - caponly primary (6 picks)
2-1-1 - MA Agartha - caponly primary (4 picks)
3 - MA Abysia - caponly primary (6 picks), special
2? - MA Ashdod - caponly primary (3 picks), special
1-1-1-? - MA Eriu - caponly primary (7 picks)
Tert:
1 - MA Pythium
1-? - MA Man
? - MA Tien'chi
1-1-1 - MA MAchaka
2 - MA Abysia
The 2? ones will probably get linked and non-linked versions and the ones where randoms would give level 3 will probably have versions where they can and where they can't.
elmokki
February 27th, 2012, 02:01 PM
Nation naming, especially Lizard one, was pretty crappy far too often so I rewrote it.
Now nation name files consist of three files. Long syllables (misleading name), short syllables and suffixes. Nation name format is: Long syllable + 33% chance of short syllable + suffix. Idea is to simply have tons of entries for especially long syllables and suffixes to make nations varied enough.
You can also define very precisely what a name part can be after or before. Syntax is for example:
test "cantbebefore consonant a" "cantbebefore consonant e" "derp"
which would make the name part unable to be generated before anything that starts with:
- any two letters where first letter is an consonant and the second a
- any two letters where first letter is an consonant and the second b
- derp
The keywords that contain multiple single letters are consonant, vowel, softconsonant and hardconsonant. Here's what they contain:
String[] vowels = { "a", "e", "i", "o", "u", "y", "å", "ä", "ö", "ü" };
String[] consonants = { "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "w", "v", "x", "z" };
String[] softconsonants = { "f", "h", "j", "l", "m", "n", "r", "s", "w", "v", "x", "z" };
String[] hardconsonants = { "b", "c", "d", "g", "k", "p", "q", "t" };
So basically if your limitation is "hardconsonant vowel" you get every single combination where the first letter is a hard consonant and the second letter is a vowel. If your limitation is "hardconsonant derp" you get: bderp, cderp, dderp, gderp, kderp, pderp, qderp, tderp. So yeah, you should be able to limit generation far more than you will ever need to.
My test files are written white humans in mind, but here goes a set of 50 names and with heavy recycling of current name parts, especially suffixes, a great deal of which are by kianduatha:
Ondnuiu, Duxsoum, Emia, Arcoheim, Dogegard, Doror, Cunvia, Ishnom, Swedod, Gilmitha
Lunbalstan, Warmon, Wuhullum, Nefland, Lamsorea, Helmon, Ermdod, Norgaor, Faeurnia, Lejiheim
Etten, Ishvik, Krophale, Funangea, Gaeilna, Pyjaland, Burvavik, Caance, Ugliburg, Gomovo
Netaimer, Moran, Eren, Agth, Vanmon, Warjais, Oben, Kritia, Narmark, Hamheim
Ashugal, Olaance, Erbogundy, Karnoiraine, Faeengmark, Osaany, Dorni, Ungmia, Mortium, Elegard
I won't implement these to the nation generation itself before I have sets for all the three current races, but NameGen.jar will generate names based on longsyllables.txt, shortsyllables.txt and suffixes.txt at UnitGen root directory so you can write lists yourself and test them easily and submit good lists for UnitGen releases!
elmokki
February 28th, 2012, 03:11 PM
Magic site generation works and should actually not lump every command in one site and continue to next. It'll try to combine gem commands to mages with suitable paths or units with tags of being associated to a magic path (some sacreds definitely will be such)
Site naming will get a better rehaul than it did earlier later too. I want to get rid of stuff like "Melancholic Office", which basically means I'll add tag "epic" to certain name parts and force at least one epic tag per name.
Mage generation has gotten tweaks, but it isn't ready. When it is, it'll have a ****ton of balance problems (in this context: mage setups that are horribly powerful) when I consider it ready enough too and those will have to be sorted out.
Then what's left to do is in order of effort taken:
- Fix cavalry generation
- Tweak chariot generation slightly
- Fix troop naming
- Good mage naming
- Add elite generation
- Proper commander generation that generates commanders based on what a nation needs. Basically this means that nation with flying recruits gets at least some sort of a flying commander, nation with stealthy troops gets at least one stealthy commander etc. This does not mean that a nation with a flying sacred stealthy amphibian gets one commander with all of those features though (though in case of sacreds it's probably likely)
- Priest generation
- Generation of funky special abilities for units (ranging from more Ulmish stats to stealthiness to cold resistance and stuff like that) based on if they are eligible for them and the rng-gods favour the nation (all members of one race in a nation would probably get the stats, but stealth or berserking is probably just for specific lightly armored units)
- Add sacred generation
- Add custom weapon generation for sacreds
- Allowing multi race nations (well, honestly, probably less terrible than I expect it to be since I have a fairly good idea of how it can be done fairly easily, but it needs some rewriting of item generation)
- Nation/unit descriptions (this is potentially huge loads of work, but also in general generating names / descriptions is most fun)
I probably miss something too.
elmokki
February 28th, 2012, 06:51 PM
Regarding mage generation. I had one too complex system, current one is less complex in one way but still too complex in another.
Question is, what sort of mage patterns ignoring mages that aren't really part of the official hierarcy (Fortune Teller for LA Ulm or Nahualli for Mictlan as examples, but LA Marignon sailors don't suit) should be possible?
The lingo here would be that:
- School is a collection of mages of about the same available paths.
- Primary mage is the top tier mage of a country. Generally having 4 to 7 picks with the rare exception of 3? linked pattern. Maximum level reachable with 100% randoms is 4, but most of the possible pick patterns only one path can reach 4.
- Secondary mages are well, weaker versions, having 2 to 5 picks or so. Maximum level with randoms is 3, but quite a few patterns won't reach that as opposed to primaries where majority can get that one level 4. Pretty much all nations will probably have at least one secondary of some kind, but it might be gone from nations with enough options already (in base game Mictlan doesn't have a school-relevant secondary mage in my eyes)
- Tertiary mages are rarer. They range from 1 to 3 picks with maximum of 2 in a path. I would imagine they would happen mostly in cases with total mage count being rather low or no secondaries existing.
- Pattern: distribution of paths, for example 3-2-? refers to what MA Marignon's grand master has, 1 path at 3, 1 path at 2, 1 100% random.
In general the goal is to generate about maximum of 5 mages from schools for a nation, with a possible extra non-school mage (mentioned above) or a minor secondary school (LA Marignon sailor mages could be such, or for that matter LA Ulm S/B-mages if they had a major mage there too).
For school mages I see following options mostly.
3 primaries, all cap only, either one secondary or one tertiary or both.
3 primaries, at most one cap only, either one secondary or one tertiary or both.
Both cases have fairly specialized mage patterns with 2, possibly sometimes 3 paths available, probably the exact same pattern for all, except in the non-cap only case if there's one cap only variant, that might be slightly more powerful. Magic paths will vary for primaries like they do in EA Agartha or MA Mictlan - one path varies, rest stay the same. These are pretty mucn EA Agartha and EA Mictlan in terms of ingame versions.
2 primaries, 1-2 secondaries, possibly a tertiary. 0-2 cap only primaries. Either the primaries work pretty much exactly like in the 3 primary cases with same or very similiar pattern and a bit different paths or they can get a very different pattern, either with very different paths or not. Regardless of the case a nation will not get more than 6 paths and even then in those cases patterns with many randoms won't happen so you're going to be left with low path amounts. With one secondary it's a mix of the two path setups if they are different, with two they are both mini versions of the mages.
Of this setup you can find probably less in the game. I guess MA Jotunheim would suit, Gygja has 5 picks and so does Skratti, but patterns and paths are quite different. MA Tien'chi and MA Pangaea have two primary mages too obviously. Pangea and Tien'chi have rather similiar pattens for both of them.
Lastly one primary setups. They can have the "traditional" 1 primary, 1 secondary, 1 tertiary setup with paths just getting weaker and weaker as tier goes down, or they could scrap the tertiary. Primary being cap only or not is fairly arbitary too. With that few mages you are bound to get an unrelated bonus mage with different paths too. As a bonus you could get 2 or 3 secondaries instead of just one, all being variations of a cap only primary. Once again, either by varying the paths or varying the patterns.
Holy picks or not are a different matter handled elsewhere.
Did I miss something?
elmokki
March 1st, 2012, 09:50 PM
Mage generation with a single primary is looking fairly good. Most of the code can go to three or two mages with fairly little edits - probably anyway - so those should get ready soonish.
I'm going to rewrite the dom3db-reader (direct copy from Randomocalypse, just set to read armor/weapon data instead of unit data) a bit so I can inject UnitGen-generated equipment in it without causing issues. It MIGHT work even now actually, but it's a fairly small change in how stuff is stored anyway so I'm going to do that. I can't be arsed to start work on sacred generation before that is done since seriously, getting all sorts of funky weapons (and possibly some armor too) is half of what excites me in generating sacreds. That said sacred generation will contain a boring mode that copies stats and sprite from existing sacreds sometimes instead of actually generating a sacred. Hydras at the very least deserve to get a shot at getting generated here too.
As pointless as descriptions are for actual gameplay, I'm fairly sure I'm interested enough to code them in anyway, and since this just sounds plain awesome the design principle will be adjusted according to that (results are, however, not guaranteed to be in line)
17:00 < kianduatha> one last thing before i go for real this time: My totally unrealistic dream description thing is to have a chance for linked histories between nations(if it makes sense). So one nation would be like a former slave state of some other empire
17:02 < kianduatha> "Falchions were the only weapon heavy enough to cut through Thuringia's Heavy Knights. The days of the revolt are long past, but Forinth's Palace Guards still wear the falchion proudly in remembrance of that time" is mydream procedural description
...but descriptions will have to wait for now.
elmokki
March 2nd, 2012, 12:53 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_2_3_12.zip
- Improved mage generation. It generates only setups with one primary mage right now, but in general mage setups are pretty varying.
- New name generation discussed before has been added for all races. Lizard and black human name part lists are pretty much copypaste with some tweaks so they're fairly limited for now, but they still do generate more decent names than the old system.
- Magic sites are generated! Site paths are a bit wonky when site doesn't contain mages or gems, but it'll be fixed eventually. For heavy blood nations there probably should also be blood sites fairly often even if they don't get any blood gem income or cap only mages.
- KNOWN BUG: Commanders are capital only sometimes (fairly often). I've been too lazy to touch this even if it's essentially matter of about two lines of code.
Feedback on mage setups, mage prices and start site gem production setups is very welcome.
elmokki
March 11th, 2012, 06:07 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_12_3_12.zip
Mages are named fairly properly!
Some elites are generated, but they are unfinished (the fairly useless super light ones will probably have something funky once I'm finished)
elmokki
March 14th, 2012, 07:34 PM
Priest generation. Sometimes priests are your mages, often they're separate. Naming still needs work and I want to add magic to priests sometimes.
Also fixed a bug which ended up generating stuff like naked men of plated horses, though fairly rarely.
elmokki
March 16th, 2012, 04:21 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_16_3_12.zip
22:19 < Elmokki> priestly stuff!
22:19 < Elmokki> stealth/berserking sometimes!
22:20 < Elmokki> commander generation not retarded!
+ demon jester hat in two varieties for mages.
elmokki
March 16th, 2012, 08:39 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/mahamia.png
Mahamia is a nation which's army relies on a fairly unflexible infantry and skirmish tactics along with support from boar riding cavalry. The infantry is armed with bucklers and short swords or falchions, and the lightest infantry variant also carries a harpoon. The pinnacle of this infantry lineup is the Mahamian elite guard - moderately armed soldiers with exceptional skills. Cavalry support for the main army comes in two ways. The Mahamian light cavalry does not carry a lance, but instead fights with a sword and a harpoon. The Mahamian lancers are more heavily armored and carries a lance along with a falchion. Mahamians do not use bows, as they find a crushing charge more effective.
The Corrupted Keepers of Mahamia are mages skilled in blood magic, but they also dabble in air and nature magics and also have divine authority. All mages of their order are sacred. The religious authority in Mahamia is held by Mahamian bishops alongside the Corrupted Keepers.
Mahamia was generated randomly, this description, sadly, not yet though.
elmokki
March 20th, 2012, 11:59 AM
Mages and priests get all sorts of funky special abilities. Priests mostly just simple stuff like healing, inquisitor and sneakiness but makes get stuff ranging from those listed for priests to poison armor, fire shield, etherealness. I do plan to add secondshape system for mages (and sacreds/elites!) so I can make mages with animal or demon second shapes that actually retain holyness and give penalty to magic paths in most cases.
In addition the random item generation is working, though it needs tweaking in terms of chances and the magic items should probably be named better than "Enchanted Crossbow". It's pretty funny to see crossbows causing limp, exploding javelins and paralyzing swords. This stuff will, however, be fairly rare, but it's absolutely essential for sacreds (and mages!)
elmokki
March 22nd, 2012, 12:06 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/...gen_22_3_12.zip (http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_22_3_12.zip)
- Funky mage stuff. I'll probably work on the shapeshifting stuff next and then move to funky sacred stuff.
- Elites aren't generated anymore, but instead rather basic sacreds are. They get magic weapons, but it's too common right now. Some magic weapon effects - those that entangle - and maybe fears should be ranged only or limited shot weapon only. Sacreds don't ever dual wield or get magical bonus weapons either, that'll need a fix too.
elmokki
March 22nd, 2012, 05:33 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/ghost.png
The Black Harbingers of Ermgard have learned to cheat death. Alas, their mastery over death is not sufficient - they can hold on to the mortal world only until they have avenged their deaths (ie until battle ends)
http://koti.kapsi.fi/elmokki/dom3/unitgen/deepone.png
The Azure Priors of Helder are able to turn into horrible beasts of the depths. In this form their affinity with water magic increases, but they lose power in all other magic paths (the unit in picture happened to get a water random)
http://koti.kapsi.fi/elmokki/dom3/unitgen/turkey.png
The Divine Elders of Kongtala are able to travel fast in their fearsome turkey form. This does not hamper casting.
http://koti.kapsi.fi/elmokki/dom3/unitgen/ghoul.png
Bavarainean Keepers have mastered death. Their foul magics will raise them as ghouls upon their deaths, but this works only once - if the keepers are slain again, they will stay dead (this might be overpowered, it gives +30g cost now though)
Other forms currently implemented include: devil, frost fiend, great bear, wolf, werewolf, jaguar, and winged monkey. It's very easy to add these from .txt files.
elmokki
March 26th, 2012, 06:54 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/hoburg.png
kianduatha also made a good pile of weapon effects, stat filters and shapeshifts
elmokki
March 27th, 2012, 01:43 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_27_3_12.zip
Hoburgs with archers, priests, mages, infantry and cavalry, good pile of tweaks and some extra stuff for sacreds and mages by kianduatha.
elmokki
March 29th, 2012, 03:57 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/goatcav.png
CoE3 might be pretty crap, but the sprites are awesome! :D
elmokki
March 30th, 2012, 05:06 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_31_3_12.zip
- Remade hoburg sprites!
- Some new sprites including goat cavalry!
- Priest/Magic nation summaries!
- Unit naming overhaul with rather small amounts of visible changes!
- Sacreds get names!
elmokki
March 31st, 2012, 08:16 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_1_4_12.zip
This is first version I consider playable, and some people on IRC are playing a blitz with it.
It adds:
- Bug fixes
- Sacreds and mages get descriptions that tell all the hidden stuff you wouldn't otherwise know without looking at .dm file and usually something more too.
- Nations get a generic descriptions that tell hidden stuff and some other general stuff.
- It generates descriptions.txt to the mod's folder with all nation descriptions.
Recommended way of playing: Generate mod with about 2-3 times more nations than players and copypaste the descriptions.txt to a thread and make people choose based on that alone. Then let people peek at their choices once everyone has chosen.
This way people will have general clue about what they will get, but people can't pick the best nations right away since the descriptions are a bit vague.
elmokki
April 1st, 2012, 07:03 AM
The armor destruction magical effect is aoe-1 and ludicrously good especially for archers so it was removed.
This morning I've:
- Fixed commander generation so you should be guaranteed flying commander if you have flying units etc. There was a bug sometimes hindering this.
- Sacred commanders should not show up in starting armies or militias any more and as an additional bonus commanders should be now ordered non-mounted - mounted - sacred instead of fairly random order.
- Chariot generation fix: heavier chariots are more expensive and all chariots have a bit higher encumberance
- Ranged sacreds are rarer. Vanilla has total of one of those (two if you count LA Man Wardens I suppose, but one with magic bow anyway), but in UnitGen they should still be considerably more common than that.
- Magical bows should get a bit less extra stats.
- The magic special effects may affect unit prices now. I added very basic price increase tags to most effects I felt deserve one without thinking much.
- Nations get 5 to 10 extra gods based on random numbers and their magic paths to choose from. I didn't bother to list every single pretender in the game, but there's a good pile of them and hey, if someone feels like something is lacking, they can always add more themselves at /nations/gods.txt
elmokki
April 1st, 2012, 04:30 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_1_4_12-v2.zip
elmokki
April 3rd, 2012, 08:20 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_3_4_12.zip
- Caelians as a race
- Scouts/Spies/Assassins (pretty basic though.)
- Fixes and tweaks to various things as usual.
elmokki
April 5th, 2012, 05:42 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen...tgen_6_4_12.zip (http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_6_4_12.zip)
- Caelians and Abysians
- Thanks to kianduatha for Abysian nation names and base sprites.
elmokki
April 7th, 2012, 12:44 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/foulspawn.png
This is totally doable with current UnitGen version and while a lot of stuff can be copied from humans graphically, in practice this'd need a lot of redefining of things (not in code, item definitions) to work properly so I'm not gonna implement it now for **** and giggles since it'd actually take work.
Oh yeah, also, humans/lizards/black humans can use great swords and great clubs now.
Ragnarok-X
April 7th, 2012, 03:31 PM
So, where can the tool be downloaded ?
elmokki
April 7th, 2012, 03:52 PM
So, where can the tool be downloaded ?
You can get test builds I occasionally bother to release from http://koti.kapsi.fi/elmokki/dom3/unitgen/. The naming is formatted unitgen_dd_mm_yy.zip.
ie right now it's http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_7_4_12.zip which I just uploaded.
I'm too lazy to keep updating a specific link on the first post seeing how I tend to release like 3 versions per week on average.
Ragnarok-X
April 8th, 2012, 06:13 AM
I like it.
Suggestions for now:
Spritegen:
When altering RGB values, make it autorefresh the image immediatly instead of waiting for an enter.
i.e. i alter the R value from 255 to 100, immediatly update the sprite after each use of the TABULATOR
Second, i think the sprite should have 2 images. Right next to the current layout, put a 200 % zoomed version so we can see details better.
In addition, how do you get the color-edit focus to an item other than the helmet ? I tried altering bonus weapons color, but the RGB was always applied to the helmet ?
This is really awesome. Just for the fun it, i created a random nation.
I got a mix between ulm, hoburg and abyssia. Basicly hobbits in heavy armor (prot 20, move 3/1) and mages with blood and astral. Elite unit was called "Pure Paladin" and has an heavy hammer and a crossbow. Lolz much ?
elmokki
April 8th, 2012, 07:07 AM
I doubt I can be arsed to update SpriteGen. I know it's shortcomings but since it's the UnitGen part I'm primarily developing I don't really mind them.
Also having different colors for two items isn't even technically possible right now. It wouldn't be hard to implement really, but in terms of UnitGen I haven't really figured out why I should bother.
I would also like to point out that with the sprite parts UnitGen contains it's fairly easy to construct sprites with GIMP or Photoshop or whatever graphics editing program. More work than just choosing from dropdown menus, but allows more customization too.
Ragnarok-X
April 8th, 2012, 08:13 AM
Okay, i understand.
How is balancing ? When using the hoburg nation, i would that the 3 mages were really, really imbalanced to each other (gold cost for too low for the tier 3 one).
In addition, i dont think milita was balanced either (too many small pro 17 guys) per gold.
Try it, it was names "Ragnarok".
elmokki
April 8th, 2012, 08:38 AM
It doesn't generate the same mod based on names, but doesn't matter, I know how pricing and militia etc work in principle.
In terms of mage prices MA Abysian warlock has 3 blood, 2 astral and one random pick, costing 270g. In UnitGen the exact same would be 300g, 290g if it's a human. Sure, MA Warlock is cap only, but I found no correlation between being cap only and price so it isn't affected. If you think some mage is too cheap or too expensive do list race, exact magic picks and price and I'll take a look. Also remember that mage prices can ramp up due to special abilities like forge bonus, shape changes etc, though for mages rather few abilities affect price.
How militia amounts (and start army amounts, except they get a bonus multiplier) work is that base amount is 10 units per 10 pd. To this resource modifier and gold modifier are added. They are like this:
resource modifier = 22.5 - 1.25 * rescost - 10
gold modifier = 26.666 - 1.666 * goldcost - 10
Resource costs are calculated with size 2 resources (ie those listed in databases etc), so hoburgs should cost extra resources compared to actual cost.
Basically hoburgs being 8g by default they get 3 extra units from being so cheap, but they need to cost only 13 resources to be brought back to 10 per 10 pd. Of course there might be something wrong in the calculations, but I doubt they swarm that much compared to general levels of PD in UnitGen.
Sure, they have prot 17 and can swarm like no tomorrow, but 6 hp is a very serious weakness too.
curtadams
April 8th, 2012, 12:22 PM
Is there a way to run this on a Mac?
elmokki
April 8th, 2012, 01:27 PM
Is there a way to run this on a Mac?
Yes. There may well be a better way but this is what kianduatha figured out:
You'll need to open terminal, ie actual text based thing where you can type stuff in (since I believe there's some console thing on mac that doesn't allow you to type into) and navigate to the folder you have UnitGen in. Then you'll write java -jar unitgen.jar and press enter and it'll launch if you have Java JRE installed.
I'll ask kianduatha to check if I wrote this correctly once he pops in IRC.
curtadams
April 8th, 2012, 05:42 PM
I get "Bad version number in .class file". What version of java are you using?
elmokki
April 9th, 2012, 03:37 AM
Newest possible. Though I believe 6 should be new enough for UnitGen.
Ragnarok-X
April 9th, 2012, 04:43 AM
I tried this some more and came up with the following suggestions. I hope you can include them.
Most nations made are too generic. I think 6 or 7 times (out of 8) i got a nation with 4 normal infantry w/ mace, spear, axe, falchion, then heavy variants of these 4 guys, sometime 1 rider, always 1 (interesting!) sacred.
Commanders were mostly 1 spy, 2 commanders w/ different weapons, 1 priest and 3 mages + 1 high priest.
I think you need to add more diversity.
For example, i believe most nations should NOT get a melee variant for *each* weapon chassis.
Maybe give it a 100 % chance for a combination of 2/2 infantry/heavy infantry variants, i.e. spear/axe or spear/mace or mace/ace with a 100 % offchance for the same heavy variant.
Then, a 35 % chance to add in a third melee guy with new weapon (i.e. 35 % a nation with spear/axe gets mace) and then anohter 35 % to get the fourth melee variant. Maybe a 20 % base-chance for a dualwielder of a random weapon.
In addition, a %-based chance to get 2 sacreds and/or light/heavy variant of a sacred.
Regarding commanders, they need better naming. The nations i made all had 2 commanders, which unfortunally were named "Commander" too.
I wish you had randomness to the naming, i.e. even chance for name "Commander", "Lord", "General", "Warchief".
Then, instead of giving 2 alternate commanders w/ different weapon, make the nation have 2 REALLY different commanders (i.e. 40 leader vs 80 leader /w standard). For Example, Commander and High Commander, Lord and Great Lord, Warchief and Seasoned Warchief.
In addition, give the nation a small chance to get the commander-class a magic pick (i.e. the tool creates a high commander that has 1 magic pick with a 10 % chance -> NOT 10 % per recruit, but a 10 % chance to get a 100 % m1 commander in nation creation).
Same goes for holy mages, i.e. some nations get H1 on their lesser/higher commander).
Lastly, maybe you could introduce a .ini file for this. The value aboves (%-chances) are defined using a .ini file, and everyone could alter their .ini file to get the programm to create nations like they want.
I applaude your work and hope you consider my suggestions.
The coolest race i got had serpent cataphracts and the sacred was a spider rider + h3 high priest. And i got hoburgs that got a sacred poison spearman.
elmokki
April 9th, 2012, 10:42 AM
Well, normal troops are right now generated so that nation gets 3 or 4 different weapons and 2 or 3 different armors and every single combination is generated for infantry. For archers 1-2 weapons are generated and two armor variants for each weapon are generated. Cavalry is a bit different, nations get 1-3 mounts and then they get: lance cavalry or onehanded cavalry depending on a dice roll, two handed cavalry if possible (basically only if there's a great axe available actually), and a light lance cavalry. The program tries to generate cav versions for each armor, but it also depends on the available mounts. If there isn't a heavy mount then there just simply isn't a full plate cavalry unit. Obviously when a race just doesn't get some role, it won't be generated. Abysians don't get ranged, chariots or cavalry, lizards don't get cavalry and flying races don't get cavalry or chariots.
So basically you're looking at potentially like 20-24 units we're thinning the herd down from. The thinning algorithm first decides the roster size in all different areas (cav/chariot/ranged/infantry) and then starts thinning the units. Generally it always tries removing a whole tier of armor from that role first, if that is too much it tries removing one weapon type and if everything else fails it removes a random single unit. I do agree that I should probably make it chance based so that it at least sometimes - actually might be a good idea to have it do it pretty often - prioritizes removing a random unit.
I would, however, like to note that troop rosters in the game are relatively monotonous already. Many nations get very similiar units with minor changes, and it's okay. It's obvious people won't in general recruit more than 3 or 4 different unit types at most. Even then in some cases it allows a tactical choice (naginata vs katana vs no-dashi is at the very least tougher than mace vs spear vs broad sword), even though that choice is an once per choice and varies between players, not between turns in a single game (or well, naginata is 4 more damage than katana, but the pricinple stays).
The commander generation in all it's simplicity right now is picking existing troops so that all the special tags (like flying, stealthy, amphibious, 50% chance of sacred to be guaranteed to be a com) are filled if possible. I agree it could use some 80 leadership commanders, more diverse naming - especially the sacred commander version of let's say Death Templar should probably be something like Death Lord - and both commanders and priests should have magic occasionally. It isn't exactly a high priority though since unless a commander (I'm mostly looking at sacred commanders) is thugworthy or has an useful special trait (flying for that hoburg hawk cavalry or stealthy for stealthy troops) it just won't be recruited almost at all.
You can already change many of the probabilities for the program. You can't influence mage setups (1, 2 or 3 primary mages) or the path patterns they get (one path at 3, one path at 2 and one random is more common than let's say two paths at 2 and 2 linked randoms). You also can't influence the cav-chariot-archer-infantry ratio. What you can, however, influence is the probability of appearance for different sorts of magic weapons for sacreds, different sorts of special features for mages, sacreds and priests, and different sorts of gear for every single unit generated. Oh yeah, also general nation traits (both stuff shared by all units of primary race and stuff like blood sacrifice) and the probability of different pretender chassises appearing are modifiable.
Ragnarok-X
April 9th, 2012, 11:27 AM
I understand your reasoning, and obviously its your tool. I just posted what i would be looking for in a programm should i use it. Of course i already do use it for SP, but i think the suggestions i made would make it even better. I think most dom 3 players love flavour, variance and decision-making, as such, adding more unique/diversity would add a lot.
Im looking forward to newer revisions, especially if you enable (...) even more user-customization.
thank you.
I forgot to mention, the spider-mount sacred i got, they even had enchanted maces. Good times.
elmokki
April 10th, 2012, 08:18 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_11_4_12.zip
SpriteGen shows a 2x zoom version along with the normal image. UnitGen may have something new, not sure if I've touched it.
Ragnarok-X
April 11th, 2012, 05:51 AM
I have a small bug report and a suggestion.
Firstly, in the last 2 days i created a lot of nations and played them for 2 or 3 turns. About 30 or so.
I had many occasions, where units had the sprite of holding a flail, but they were actually equipped with a mace. You might check that, im pretty sure there is art mixup there.
I have to say something about balance yet again. I suppose all these nations are made with middle era in mind. However, i found that there is really strong bias towards heavy protection in the nations made. Out of 30 nations, i would say about 20 had protection 14+, many even protection 16+. Many nations felt like you were playing Ulm. I didnt matter if i got lizards, hoburgs or humans, heavy protection nations were certainly favoured among nation creation. I believe you might want to check that, maybe lower the bance chance for heavy armor and stuff. Nations similar to Miclan (i.e. low protection in general or sacred heavy) nations seem to be impossible atm, maybe you can add a modifier which grants + sacreds or disabled heavy armor to increase variance.
In addition to the different mounts, i would love if you would add the tien chi tiger or miclan jaguar as base mount arts. Maybe even add pegasus or griffin knight wings as a sprite so there can be flying boards, lizards, tigers. That would be awesome.
Regarding sacred creation, i got a bunch of nations that got a sacred with crossbow and heavy melee weapon, which is rather unfortunate. Maybe decrease the chance for that. Ranged and dagger or melee and jav or poision pipes is fine, but many times i got stuff like long spear and crossbow or enchanted mace and arbalest, which seems unlikely and less useful.
Lastly, one thing in particular i did not like is how ranged stock units are created. Several times i got crossbow or arbalest infantry, of course with 2 variations, normal and heavy. In these cases, the heavy variants had heavy armor (obviously) and ressource cost went from ~ 15 to 25/30. I think this is rather useless. I never found myself in the situation where i wanted to buy heavy armor ranged infantry especially considering the increased ressource cost. I think you should definitly disable the routine that automaticly creates a heavy armor variant, at least for xbow/arbalest shooters.
Im so looking forward to further tinkering with unitgen and hope for updates and more features. Thanks for including the sprite-zoom in spritegen.
edit: lastly, would it be possible to create a logfile with each nations created ? I would like to the reason for nation creation, i.e. the exact rolls that resulted in certain units being created.
elmokki
April 11th, 2012, 11:38 AM
I have a small bug report and a suggestion.
Firstly, in the last 2 days i created a lot of nations and played them for 2 or 3 turns. About 30 or so.
I had many occasions, where units had the sprite of holding a flail, but they were actually equipped with a mace. You might check that, im pretty sure there is art mixup there.
I need the races of these units to look at it. There's no way it can happen on all races since Tengu and Hoburgs don't even get flails and Abysians have a different sprite for it than the other nations.
I have to say something about balance yet again. I suppose all these nations are made with middle era in mind. However, i found that there is really strong bias towards heavy protection in the nations made. Out of 30 nations, i would say about 20 had protection 14+, many even protection 16+. Many nations felt like you were playing Ulm. I didnt matter if i got lizards, hoburgs or humans, heavy protection nations were certainly favoured among nation creation. I believe you might want to check that, maybe lower the bance chance for heavy armor and stuff. Nations similar to Miclan (i.e. low protection in general or sacred heavy) nations seem to be impossible atm, maybe you can add a modifier which grants + sacreds or disabled heavy armor to increase variance.
It can be tweaked pretty easily. I'll also probably need to look into nation tag generation since some nations did at some point occasionally get tagged "primitive" and those nations generally were in leather and some ring mail.
In addition to the different mounts, i would love if you would add the tien chi tiger or miclan jaguar as base mount arts. Maybe even add pegasus or griffin knight wings as a sprite so there can be flying boards, lizards, tigers. That would be awesome.
Flying whatevers is actually a pretty neat idea and can definitely be implemented. Mounts (and helmets, weapons and shields) are very easy to add in general, but my policy is that I don't really take requests on graphics as the whole program is designed so that pretty much anyone can define new stuff in so I don't have to do all the graphics (that said like 95%+ are made by me currently and the rest is by kianduatha)
Regarding sacred creation, i got a bunch of nations that got a sacred with crossbow and heavy melee weapon, which is rather unfortunate. Maybe decrease the chance for that. Ranged and dagger or melee and jav or poision pipes is fine, but many times i got stuff like long spear and crossbow or enchanted mace and arbalest, which seems unlikely and less useful.
Not all sacreds need to be useful, but I do agree that at the very least the primarily ranged sacreds should have a reduced chance of getting a magical melee weapon.
Lastly, one thing in particular i did not like is how ranged stock units are created. Several times i got crossbow or arbalest infantry, of course with 2 variations, normal and heavy. In these cases, the heavy variants had heavy armor (obviously) and ressource cost went from ~ 15 to 25/30. I think this is rather useless. I never found myself in the situation where i wanted to buy heavy armor ranged infantry especially considering the increased ressource cost. I think you should definitly disable the routine that automaticly creates a heavy armor variant, at least for xbow/arbalest shooters.
Take a look at base game ranged units. Yes, the only units people tend to use are the lightest ones possible, but there still are plenty of needlessly heavy crossbowmen (as an extreme, Agarthan full chain crossbowmen, but nations like MA Ulm get a fairly heavy crossbowman already). Not all the units need to be useful, which is the case in all categories. That said the heavy armor on ranged might be too common right now, so it could probably get some weighing towards lighter armor (this is also something absolutely anyone can do)
edit: lastly, would it be possible to create a logfile with each nations created ? I would like to the reason for nation creation, i.e. the exact rolls that resulted in certain units being created.
I'll take that to mind for if/when I bother to rewrite some systems to be more user accessible.
Ragnarok-X
April 11th, 2012, 12:40 PM
hey,
i realize most my sugggestions (like chances for armor, weapons, equipment) can be modified using the existing files. However, i have one huge problem with that. Currently im already using several modded files, i.e. i added more description variables for sacreds, more tri-path mage-class names suffix and prefixes but at some point i realized all of my altered files will be gone for good if i download a new revision and replace all the files. Since i already dont know which files i tinkered with, (and thus cant save) i decided to stop modding them alltogether until you realize a "breakthrough" revision which then will be more durable.
If i do sprite parts for tiger/jaguar (more maybe) will you incorporate them in offical revisions ?
elmokki
April 11th, 2012, 01:01 PM
hey,
i realize most my sugggestions (like chances for armor, weapons, equipment) can be modified using the existing files. However, i have one huge problem with that. Currently im already using several modded files, i.e. i added more description variables for sacreds, more tri-path mage-class names suffix and prefixes but at some point i realized all of my altered files will be gone for good if i download a new revision and replace all the files. Since i already dont know which files i tinkered with, (and thus cant save) i decided to stop modding them alltogether until you realize a "breakthrough" revision which then will be more durable.
When you do changes submitting stuff to for example this thread is a pretty good idea.
If i do sprite parts for tiger/jaguar (more maybe) will you incorporate them in offical revisions ?
Pretty much anything that looks decent will be added in. I do hope though that instead of just graphics people will also do the text based parts of item additions, since in some cases that's like half the work.
Ragnarok-X
April 11th, 2012, 02:35 PM
If possible (please) could you alter the routines so that not every race gets an heavy armed variant of each infantry ? Something like a 50 % chance to spawn a heavy variant would be great (for me). In additionn, please alter the amount of base types so that not each race gets 4 melee weapon variants. If you dont feel like altering it in general, would you kindly explain to me where these values are stored ?
Regarding the mace/flail thingy, i was mistaken. It was not a mace, it was a morning star. I.e. many races had units with a flail artwork but a morning star equipment. I will run another 10 nations today evening and if i spot anything, i will post it.
Here are the mods i was able to find.
magicweapons
-- 64: decay
#unitname "prefix warped"
#unitname "suffix 'of warp'"
-- 216: Fire
#unitname "prefix charring"
#unitname "suffix 'of char'"
-- raising
#unitname "prefix soulbound"
#unitname "suffix 'of reanimation'"
sacredarmdesc
"answering their gods call, %unitname% armed with both faith and %weapons%, they are staying true to their believe"
"recruited into service, %unitname% are now leaving their holy ground, bringing justice in their gods name"
"wilding %weapons% blessed by faith, %unitname% is now forcing everyone to acknowledge the one true god"
majormagicdesc
"The %unitname% of %nation% long studies make them knowledgeable in %magics%"
"The %unitname% of %nation% are born with an affinity in %magics%"
"The %unitname% of %nation% have reached expertise in %magics% due to long training"
adjectives
planar 3 astral earth death
maelstrom 3 fire death nature
putrid 2 death nature
gorgonic 2 death nature
Acashic 3 astral
sacredparts
-- Generic
#define
#name "divine"
#tag "notsuffix"
#basechance 1
#end
#define
#name "just"
#tag "notsuffix"
#basechance 1
#end
-- Nature
#define
#name "firstborn"
#basechance 0
#chanceinc "magic nature 1"
#tag "notsuffix"
#end
#define
#name "primordial"
#basechance 0
#chanceinc "magic nature 1"
#tag "notsuffix"
#end
-- Crosspath
#define
#name "hellbent"
#basechance 0
#tag "notsuffix"
#chanceinc "magic earth fire 2"
#end
#define
#name "radiant"
#basechance 0
#tag "notsuffix"
#chanceinc "magic fire astral 2"
#end
#define
#name "devouring"
#basechance 0
#tag "notsuffix"
#chanceinc "magic earth nature 2"
#end
elmokki
April 11th, 2012, 02:51 PM
Regarding the mace/flail thingy, i was mistaken. It was not a mace, it was a morning star. I.e. many races had units with a flail artwork but a morning star equipment. I will run another 10 nations today evening and if i spot anything, i will post it.
Morningstar is graphically pretty much a flail with just one ball-in-chain and one hand length shaft. While I personally consider both the Dominions 3 long two handed flail and the graphic for morningstar flails and morningstar a spiked ball on a shaft without a chain, Dominions 3 base graphics have morningstar drawn as one handed flail so it's the same in UnitGen.
Ragnarok-X
April 11th, 2012, 04:51 PM
Well, that wasnt too hard. Since i cant add new basesprites into spritegen, i just created tiger and named it like the boar mount. Selected boarmount in the tool, preview showed the tiger, saved and it worked.
http://prntscr.com/80h8s
Can you add functionality to add new sprites for users ?
elmokki
April 12th, 2012, 02:10 AM
You can add sprites. You just need to define them as mounts for a race.
Like for example humans, you'll probably want to go to /races/human/human_mounted/humanmounts_low.txt (humanmounts.txt is horses, the difference is the positioning of the leg: it's "shorter" in the non-horse poses)
There you'll just add like
#newitem
--- Pretty much any name an another mount doesn't already have
#name "tiger"
--- Only matters for for items that the game considers items, ie armor, shields and weapons.
#gameid -1
--- Replace with your tiger sprite:
#sprite /graphics/mounts/standard/serpent1.png
--- Doesn't matter if this really exists or not since it's just for indicating some #gameid is armor instead of weapon
#armor
--- Since it's a mount these mean the actual rider will be 7 pixels left from the normal position and 14 pixels below the normal position. You'll probably want to ignore these at first and then adjust them once you see your sprite in SpriteGen.
#offsetx -7
#offsety 14
--- mountedoverlay.txt in the same folder defines an overlay named "6" (yes, terrible name) which is pasted on top of everything after everything else is drawn. This is basically the mount's head and most visible on spider where it makes the leg look decent.
#needs overlay 6
--- #define commands define what stats the item should affect
#define "#size 3"
#define "#mapmove 2"
#define "#ap 18"
#define "#mounted"
#define "#weapon 19 --- Bite"
--- This is a bit different. You can just give it a number, but if you want the mount to be sacred/not sacred depending on the rider you'll need to go play with /nations/secondshapes.
#define "#secondtmpshape serpent1"
--- The +35 is there to indicate it increases gold cost, the other stuff don't have + or - so they just set the value to that.
#define "#gcost +35"
#define "#ressize 2"
#define "#enc 3"
--- The "animal serpent" #theme line is pretty important for summaries and generating somewhat coherent lineups
#theme "animal serpent"
#theme "light"
--- Guaranteed (it's a bit bugged so it isn't) prefix for units, ie most cavalry with this mount are "Serpent Cavalry"
#tag "guaranteedprefix serpent"
--- Maximum chest armor prot this mount can carry, minprot is the opposite. If you plan to make a mount with 0 to 100 armor, you probably want to split it to 0 to 12 and 13 to 100 versions with different gold cost increases.
#tag "maxprot 13"
#enditem
The reason I'm not very happy with just graphics is that writing those things to right places is actually usually more work than some weapon or mount or similiar.
Ragnarok-X
April 12th, 2012, 01:21 PM
Ok, i see. Its actually a lot of work to implement sprites if you want to associate them with values.
Assuming i add the tiger like you described, it will not only show up in spritegen, but from then on it will as well be used in nation gen ? I dont think so, right. Can you write a tutorial about getting it to show up in unitgen, i.e. where to set base chance and stuff ?
Once i have a full tutorial, i could begin adding real units.
Ragnarok-X
April 12th, 2012, 01:25 PM
#newitem
#name "tiger"
#gameid -1
#sprite /graphics/mounts/standard/tiger.png
#armor
#offsetx -4
#offsety 4
#define "#size 3"
#define "#mapmove 2"
#define "#ap 18"
#define "#mounted"
#define "#weapon 19 --- Bite"
#define "#gcost +35"
#define "#ressize 2"
#define "#enc 3"
#define "#rcost +5"
#theme "animal serpent"
#theme "light"
#tag "guaranteedprefix serpent"
#tag "maxprot 13"
#enditem
This is what i added.
I then did put a barechest guy with spear on top of it.
the unit def turned out like this>
--- Unnamed, Gold: 40, Resources: 9
#newmonster 0
#name "Unnamed"
#spr1 ".unit_0_a.tga"
#spr2 ".unit_0_b.tga"
#descr "No description"
#gcost 40
#ap 18
#mapmove 2
#mor 10
#mr 10
#hp 10
#str 10
#att 10
#def 10
#prec 10
#enc 3
#size 3
#mounted
#weapon 352
#ressize 2
#rcost 5
#armor 118 --- Half Helmet
#weapon 1 --- Spear
#end
Now, i think this is wrong. Its missing the bite attack and a potential stat increase for being mounted. What am i missing _
thanks
Ragnarok-X
April 12th, 2012, 04:23 PM
I added tiger, jaguar and wyvern.
Unfortunally the wyvern sprite doesnt show the FACE of the base human.
why not ? I aligned the sprite of the wyvern on top of the pegasus rider, so the offset is correct.
Will you include the edits from earlier (where i posted in code) in the next build ?
Because if not, i wont bother to post all the stuff in this thread, thanks.
If you, i can upload the sprites and altered .txts entirely or just in code-tags like earlier.
In addition, do you want my "help" / posting in here or on the dom3mods ?
dont mind with the attachments, i forgot to add weapon with the nostrength tag to the mounts. But you can check the problem witht he wyvern if you would.
The files in general work, i just got a tiger rider to spawn in a nation.
elmokki
April 12th, 2012, 05:29 PM
The wyvern problem is not because of you, apparently it's because of a bug that affected the hoburg hawk riders earlier too. I fixed it any from next version on it should look fine. The wyvern, however, probably needs an overlay to not look silly (you'll probably see once it's fixed and use big shield and big weapon). If you really want to get this fixed quick, go to races/human/poses.txt and add the line:
#renderorder "shadow cloakb mount basesprite shirt legs armor cloakf bonusweapon weapon offhandw hands hair helmet offhanda overlay"
to both mounted poses, ie after the #newpose line obviously.
In general, good job. They look good and seem to be positioned correctly too. Your item definition code looks good and it DOES add the bite attack when I tested it. Your unit has #weapon 352 which is the boar #nostr gore attack, so maybe you did some mistake? The unit price is lower than supposed probably because it's naked and gets the -30% cost reduction and is rounded to closest 5 afterwards.
#newmonster 0
#name "Unnamed"
#spr1 ".unit_0_a.tga"
#spr2 ".unit_0_b.tga"
#descr "No description"
#gcost 30
#ap 18
#mapmove 2
#mor 10
#mr 10
#hp 10
#str 10
#att 10
#def 10
#prec 10
#enc 3
#size 3
#mounted
#weapon 322
#ressize 2
#end
This is also adding these items to unitgen. With your files occasionally it would indeed generate units with those mounts. I forgot to mention that at the moment you can use #skipchance 0-100 to make mounts rarer. #skipchance 100 means it will never be generated, #skipchance 50 makes it a 50% chance to skip over the mount. This system will change eventually if I can be arsed to code though, since everything else uses a system where you write the chances differently and it's a better system.
You'll also probably want to use the #theme "animal serpent" correctly (and pretty much all the possible minimum and maximum armor things too), ie #theme "animal tiger" for tiger, otherwise you'd see tigers bundled with serpents very often. You'll also probably want to add a claw attack to the tigers since I think they have both claw and bite in Dom3.
I don't care which forum you post on, but I do prefer code tags instead of whole files since that way I can just copy paste the new stuff without worrying it replaces something I've changed recently.
Ragnarok-X
April 13th, 2012, 12:04 PM
Thanks for the update.
Regarding #skipchance, thanks for letting me know. However, i dont plan on using it anytime soon since i actually had to create 4 batches of 10 nations until the tiger showed up. If at all, i need a way to increase the spawn.
I asumme i can set the tiger to "animal tiger" and use "preferredmount tiger" in the nation files, or do new pref-mounts dont work, i.e. is it hardcoded for serpent, horse, boar and stuff ?
Regarding min/max protection, am i right in assuming its referring to the base units prot values ? i.e. using only maxprot 15 will force the game to ONLY spawn this mount if the mounted unit has a prot no higher than 15 ?
If so, what will it do if the mounted unit has a prot outside the mounts specified value ?
Lastly, can you elaborate on the "naked unit" thingy again ? What exactly is wrong with it ? Do you mean the units price is too low and i need to add a certain to the mount ?
Then, what is your stance on secondshape ?
Horse units, when killed, dont spawn the horse. Lizards and snakes however create the animal unit once the rider is killed.
How do YOU want it to be with tigers, jaguars, wyvern (and im going to add bears and nightmares later) ? Should they have a secondshape on death or not ?
Can you be found in IRC or some messenger more regulary than on this forum ?
Can you release a new version of spritegen with the fixed wyvern bug so i can continue adding things on a updated version ?
kianduatha
April 13th, 2012, 01:28 PM
Thanks for the update.
Regarding #skipchance, thanks for letting me know. However, i dont plan on using it anytime soon since i actually had to create 4 batches of 10 nations until the tiger showed up. If at all, i need a way to increase the spawn.
I asumme i can set the tiger to "animal tiger" and use "preferredmount tiger" in the nation files, or do new pref-mounts dont work, i.e. is it hardcoded for serpent, horse, boar and stuff ?
Regarding min/max protection, am i right in assuming its referring to the base units prot values ? i.e. using only maxprot 15 will force the game to ONLY spawn this mount if the mounted unit has a prot no higher than 15 ?
If so, what will it do if the mounted unit has a prot outside the mounts specified value ?
Lastly, can you elaborate on the "naked unit" thingy again ? What exactly is wrong with it ? Do you mean the units price is too low and i need to add a certain to the mount ?
Then, what is your stance on secondshape ?
Horse units, when killed, dont spawn the horse. Lizards and snakes however create the animal unit once the rider is killed.
How do YOU want it to be with tigers, jaguars, wyvern (and im going to add bears and nightmares later) ? Should they have a secondshape on death or not ?
Can you be found in IRC or some messenger more regulary than on this forum ?
Can you release a new version of spritegen with the fixed wyvern bug so i can continue adding things on a updated version ?
Elmokki can be found most of the time on IRC, the standard gamesurge #dominions channel.
I am fairly confident that whatever you prefer in terms of hte secondshape will be fine; if it turns out to be unbalanceable it'll be changed.
Naked/very lightly armored units get up to a 30% price decrease automatically because that rough idea is also present in baseline dom3. Light cav therefore automatically costs less than heavy cav and so on.
Max/minprot are there so you can say that naked people shouldn't be riding heavily barded horses--currently horse cav is split up into light cav(unarmored horses) medium(like light cataphracts etc) and heavy, each with even their own equipment sets(to prevent 'naked guy with a lance' etc. Protection values generally conform to the actual protection, i.e. after base prot and armor have been taken into account.
elmokki
April 13th, 2012, 04:06 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_13_4_12.zip
I'll probably forget something but:
- SpriteGen gets a x/y sliders for mount offsets. This is purely cosmetical and meant to help getting mount sprites to correct places. Won't happen for other items for now because that's slightly more problematic.
- UnitGen accepts seeds. It should theoretically generate the same set of nations if you create a mod with same amount of nations and
- Item #skipchances have been replaced with the #basechance commands which work like filters, ie if you don't specify anything item's weigth for randomizing is 1, if you specify something, that is used. And item has chance of weight/(all weights) to be chosen.
- Tweaks. Bonus weapons seemed somewhat broken so I fixed them. Also gave Abysians a special feature which should make bonus weapons on them more common even with a bit heavier armor.
- Only tengu commanders and sacreds get the lightning strike. This is a special racial command too and customizable
- Added settings.txt where you can edit some settings. More editable stuff will probably come eventually.
- Added a pile of mounts for humans by Ragnarok-X
EDIT: Sacred commanders should also be able to get H1 occasionally.
It crashes occasionally (but is very usable anyway since it isn't that common) on generation, gonna fix it later.
elmokki
April 14th, 2012, 12:16 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_14_4_12.zip
Raiel had the awesome notion of giving a possibility of generating each nation with a separate seed. This was a brilliant idea, since now we have a concept for one more cheat preventing multiplayer method: allow players generate nations until they find one they like and then just make a mod with all the seeds players have submitted. Alternatively you could use the old semi-blind selection but just generate like 200 nations and then build a new mod on their seeds. This feature is disabled by default but the .dm file will always contain randomly chosen nation seeds if you wish to reproduce your random nations later. You can enable this and some other new interface related stuff at settings.txt
Changelog roughly:
- More awesome new mounts for humans and hoburgs by Ragnarok-X, including for example ozelotl (the flying tiger), beast bat, amphithetre and moose.
- Some name/description stuff by Ragnarok-X
- Normal/sacred commanders sometimes (relatively often) get higher maximum leadership
- Mounted hoburgs can't get tower shields (such a huge change!)
- Settings.txt contains some stuff that may or may not make life easier
- You can generate mods with each nation having a different seed (see the above small wall of text)
elmokki
April 14th, 2012, 03:48 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_14_4_12-v2.zip
Earlier version broke ranged naming, it's fixed now along with some other very minor fixes.
elmokki
April 14th, 2012, 07:58 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_15_4_12.zip
Balanced the mounts a bit, sacred weapons get potentially a slightly smaller stat increase when they do (from 2 to 6 to 1 to 4 for melee) and tweaked sacred cap only chances (settings.txt!)
jimbojones1971
April 16th, 2012, 10:17 PM
A few of questions:
1) How do I tweak it to get it to only generate nations for a particular race? I tried two things:
- setting the #basechance values in races.txt to 0.0 for nation's I didn't want (and either leaving the #basechance value for the nation I want as-is, or also increasing it to 1.0).
- removing all nations I don't want from the races.txt file, leaving only the one I want
Neither of these worked - both resulted in the game hanging in the "generating nations" step. Help! :-)
2) Are there any command line switches?
3) Is there any chance of getting a look at the source, to satisfy my curiousity about what you are doing and how you are doing it? How about if I beg?
elmokki
April 17th, 2012, 05:28 AM
A few of questions:
1) How do I tweak it to get it to only generate nations for a particular race? I tried two things:
- setting the #basechance values in races.txt to 0.0 for nation's I didn't want (and either leaving the #basechance value for the nation I want as-is, or also increasing it to 1.0).
- removing all nations I don't want from the races.txt file, leaving only the one I want
Neither of these worked - both resulted in the game hanging in the "generating nations" step. Help! :-)
2) Are there any command line switches?
3) Is there any chance of getting a look at the source, to satisfy my curiousity about what you are doing and how you are doing it? How about if I beg?
1) Not possible. It generates secondary and tertiary race for each nation just in case it's needed so the program will die without at least three races. Methods you tried are in principle okay though. It wouldn't be a too big change to make the secondary and tertiary races generated only if they are required and if they exist though.
2) No, editing files and especially settings.txt are supposed to do what command line arguments would do
3) http://koti.kapsi.fi/elmokki/dom3/unitgen/temp/unitgen_17_4_12-src.zip
As I keep saying, the quality of code ranges from horrible to somewhat decent and it's largely uncommented. That said it's not so complicated program that it's impossible to make sense of at least most of it anyway.
The biggest issue is that there has been like no planning ahead so there's pointless copy paste code that could've been avoided all over the place. In terms of readability it would benefit a lot from a major rewrite :D
Oh well, if you find something you think should be changed, do tell.
jimbojones1971
April 17th, 2012, 05:42 AM
Thanks elmokki, you are a legend! :-)
It sounds like the program needs at least three races. Could I in theory (without attempting to tweak the code) just past in three versions of the same race in races.txt, to achieve the same effect? (e.g. blue hoburgs, black hoburgs, and pink hoburgs for example).
elmokki
April 17th, 2012, 01:07 PM
Thanks elmokki, you are a legend! :-)
It sounds like the program needs at least three races. Could I in theory (without attempting to tweak the code) just past in three versions of the same race in races.txt, to achieve the same effect? (e.g. blue hoburgs, black hoburgs, and pink hoburgs for example).
Yeah, that should work. They can probably have the exact same name too. The nation summaries may be a bit skewed (like, Hoburgs, some Hoburgs, Hoburg auxillaries) in some cases though.
elmokki
April 20th, 2012, 06:44 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen-21-4-12.zip
Tweaks and spritegen allows shifting any item to find suitable offsets.
elmokki
April 29th, 2012, 09:12 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen...gen_29_4_12.zip
A while since the last update but:
- A change on how same role poses are generated, more explanation below.
- Tengus not generating as a primary race, more explanation below as well.
- Oriental humans added as a race, though they still lack a mounted pose (and I forgot to give them the correct nametype)
- Atlantians by RagnarokX are partially in. They don't generate yet though since they aren't ready enough.
The same role pose generation used to require all poses of a certain role sharing the same armor. This happened with all existing things since it made no sense to have the two hander pose have less armor options than the onehand/polearm pose. Atlantians (and Caelians, just not implemented yet) however probably want to have some ice armor and whatnot stuff that generates only as a whole and RagnarokX wanted Atlantians to have shamblers in their race with yet different armors. This may still be somewhat glitchy, but by using command #tag "replacement itemname" you can make the software think some item is an another. As an example if I defined the full plate item on onehander pose of humans with #tag "replacement leatherhauberk" any twohander the program tried to generate with full plate would have leather hauberk instead. Since this inevitably would lead to duplicate units in some cases, I also added a sort of a failsafe that diversifies weapons a bit in these cases.
Tengus did lose their lightning strike from non-sacred non-commander troops a while ago, but at 15g I think they still are pretty good. Sure, size 3, but the stats are rather high and their gear in general was quite good thanks to consisting mostly of Jomonese super weapons. Currently no tengu nations will be generated, but nations of other races may get some tengus in their lineups at 20g base price. In the future I guess a nations mages might be swapped to tengus too in some cases. I would gladly make tengus a normal race in terms of generation again, but I will only do that if I get enough convincing opinions on how to make them balanced without making them non-tenguish (for example they are definitely katana/nodachi/naginata/yari/wakisazi wielding in most cases)
elmokki
May 3rd, 2012, 02:57 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_3_5_12.zip
Boring bugfixes.
jimbojones1971
May 4th, 2012, 04:00 AM
Thanks Elmokki. I will grab this now and have another play, in anticipation of City of Bronze being replaced with a new game in the near future :-)
elmokki
May 4th, 2012, 01:24 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_4_5_12.zip
- Some mages and/or sacreds might be different race than your other units!
- Some nations might get some magic paths a bit more often!
elmokki
May 4th, 2012, 04:20 PM
Trolol Raiel found a bug
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_4_5_12-v2.zip
elmokki
May 5th, 2012, 07:53 AM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_5_5_12.zip
- Terrible seed related bugs were fixed for the MP game.
- Custom weapons are possible to define. Just set #weapon command or item #gameid to refrence to the name of one. See the caveman mount and /nations/customweapons.txt for an example.
- Sacred chariots are quite rare but should sometimes appear.
elmokki
May 5th, 2012, 09:33 AM
http://koti.kapsi.fi/elmokki/dom3/unitgen/caveman.png
Hoburg Cave Knight!
elmokki
May 6th, 2012, 06:22 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_7_5_12.zip
This is a fairly big update thanks to the mp game.
- Huge loads of item / secondshape / filter / code tweaks thanks to feedback on bugs and terrible design decisions.
- Settings.txt toggle to read seeds from seeds.txt and generating nations based on that.
- Custom armor is possible
- Custom weapons can (probably) be used as magic weapon effects.
- Restructuring of custom item code.
- Slight restructuring of separateSeeds toggle (comes earlier on instead of interrupting nation generation)
- Probably plenty of stuff I don't remember.
elmokki
May 8th, 2012, 04:09 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_8_5_12.zip
New infantry generation and probably all sorts of tweaks I can't remember.
EDIT: Oh yeah, random castles.
elmokki
May 9th, 2012, 12:40 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_9_5_12.zip
Apparently a small tweak broke a multitude of things and the new infantry generation had some fairly serious flaws too. These should be fixed now and the new infantry generation should be slightly better from my point of view!
I also added an ability (toggleable from settings.txt, by default it's on) to draw graphical previews of sprites. Stuff is positioned a bit strangely but oh well, it should do it's job for now. The images are generated in .png format to the mod's folder where the descriptions are usually located too.
Oh, and stuff gained from items / race shouldn't show up on mages' and sacreds' descriptions any more, just stuff from filters. It wasn't that awesome that it told specifically that caelians fly or that a tiger cavalry can shift to a tiger.
elmokki
May 9th, 2012, 04:00 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_9_5_12-v3.zip
- Sacred commanders get more suitable names (an Emerald Knight might be lead by an Emerald Master and so on)
- Fixed bugs that won't show up unless you edit files anyway.
elmokki
May 12th, 2012, 06:38 PM
Not using unitviewer. Secondshape descriptions should be fine in newer versions.
Anyway:
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_13_5_12.zip
- Some new unit/item generation code. Not all I want, but it seems to work so hey, why not release.
- Ability to give custom sprites to secondshapes. You need to specify both #spr1 and #spr2, but #spr2 can be "shift" which uses #spr1 and shifts it 5 pixels to left like all the attacksprites in unitgen. Don't use "" for filepath like in Dom3 normal syntax and specify paths relative to unitgen (see the nightmare for example.). If someone makes a good case, I'll add the same code to pretender gods so custom pretenders can be made.
- Secondshapes can inherit some of the abilities their firstshape has. For mounts this is limited to resistances and berserking, but for non-mount secondshapes there are some extra things that work. This stuff is defined at /nations/secondshapeinheritance.txt so take a look if you are interested in specifics.
elmokki
May 13th, 2012, 05:57 AM
Did you think caveman cavalry was awesome? Well, there's apparently one race that's even more creative with what they ride!
http://koti.kapsi.fi/elmokki/dom3/unitgen/fossilcav.png
kianduatha made some mounts for Abysians! Along with that awesome thing there are scorpions and salamanders.
Strabo
May 14th, 2012, 06:03 AM
I tried to mod in ichtyid race, but unitgen crashes, when gets to generating nations. What could I do wrong?
Crash Report
UnitGen nation generation!
Version CAKE of 13.5.2012
--------------------------
How many nations should be generated? (default: 1)
5
What should the mod be named? (default: nation name or randomly generated name)
Invalid value.
What seed (integer) should be used? (default: 1690906354)
Invalid value.
Reading Dom3DB from units.csv... 2107 definitions loaded!
Reading Dom3DB from armor.csv... 251 definitions loaded!
Reading Dom3DB from weapon.csv... 541 definitions loaded!
Loading nation tags... 26 tags loaded!
Loading miscellaneous definitions... 301 definitions loaded!
Loading races...
Race atlantian - 5 poses loaded.
Race human - 9 poses loaded.
Race lizard - 6 poses loaded.
Race black human - 7 poses loaded.
Race hoburg - 4 poses loaded.
Race caelian - 4 poses loaded.
Race tengu - 4 poses loaded.
Race oriental human - 4 poses loaded.
Race abysian - 2 poses loaded.
Race ichtyid - 1 poses loaded.
Race foul spawn - 1 poses loaded.
11 races loaded!
Generating nations...Exception in thread "main" java.lang.NullPointerException
at unitgen.item.ItemGenerator.generateItemKey(ItemGen erator.java:339)
at unitgen.item.ItemGenerator.generateArmor(ItemGener ator.java:269)
at unitgen.item.ItemGenerator.generateItems(ItemGener ator.java:50)
at unitgen.Nation.generate(Nation.java:336)
at unitgen.NationGen.<init>(NationGen.java:290)
at unitgen.NationGen.main(NationGen.java:425)
Press any key to continue . . .
elmokki
May 14th, 2012, 07:31 AM
First of all: I highly encourage being on IRC or sending me modded files so I can actually check the things instead of trying to guess based on line numbers. Preferably both.
For this specific problem my guess would be that you have no body armors that have protection of 10 or more. This is a silly requirement that along with some other silly requirements should be gone once I bother to finish updating the troop generation code though.
EDIT: Also, mage a pose with "mage priest" as type. Just copy your infantry pose for now, but it _NEEDS_ infantry pose, mage pose and priest pose to succesfully generate anything. You apparently only have 1 pose and anything with 1 pose just won't work (foul spawn are disabled since they were just a test that may be finished at some point when I get bored with Diablo 3)
Oh yeah, also, RagnarokX is making atlantians and those are apparently nearly ready. You may wish to use some of those graphics once they're added to unitgen.
Strabo
May 14th, 2012, 07:42 AM
Added an armor with protection 10, but it still crashes, so I'll just upload all new files here. Thanks for the suggestions, I was already using some atlantian graphics and files as examples :)
Here's what I have in races.txt file:
#newrace
#name "Ichtyid"
#basechance 0.2
#poses /races/ichtyid/poses.txt
#longsyllables /races/ichtyid/longsyllables.txt
#shortsyllables /races/ichtyid/shortsyllables.txt
#suffixes /races/ichtyid/suffixes.txt
#define "#def 8"
#define "#mor 12"
#define "#mr 8"
#define "#gcost 10"
#define "#prec 8"
#define "#enc 3"
#define "#hp 12"
#define "#str 10"
#define "#ap 11"
#define "#amphibious"
#tag "magicaffinity water 0.5"
#endrace
EDIT: Missed a "mage pose" part, will try right now.
EDIT2: Still does not work
elmokki
May 14th, 2012, 09:09 AM
This time it fails to having only one helmet (two is minimum, but once again, silly stuff like thiss will dissappear in a version I'll release today if I'm productive enough before Diablo 3 is released. Doesn't need tons of code so there's a good chance for it, but in general I do have to note that any race should have at least a few choices for armor and helmets and preferably more than a few for weapons.
Currently it crashes because it needs at least one helmet with 10+ prot and two helmets total, though it may crash with two helmets too unless one is 16+ prot and the other is under 10 prot. Terrible code.
I added two helmets with full helmet id and the "mage priest" pose and it generated at least one nation without crashing.
Strabo
May 14th, 2012, 09:17 AM
That's great, thank you! Now I can continue doing my stuff.
elmokki
May 14th, 2012, 11:58 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_14_5_12.zip
- kianduatha's awesome Abysian cavalry!
- new troop generation code is in place, but needs some tweaks (max/minprot still does not work). This changed how shields/helmets/bonus weapons are generated slightly. If it feels somehow stupid, give me suggestions! This change should remove pretty much all (or most) stupid restrictions on item amounts, but I do still want to emphasize that any list of armor, helmets, weapons or shields with only one item is probably somehow boring and bad.
elmokki
May 14th, 2012, 05:16 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_15_5_12.zip
Last version was made in THE OPPOSITE LAND and everything that wasn't supposed to shapeshift back shapeshifted back and vice versa.
elmokki
May 16th, 2012, 12:50 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen...gen_16_5_12.zip (http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_16_5_12.zip)
Tweaks and atlantians by RagnarokX.
elmokki
May 27th, 2012, 05:39 AM
I'm a bit dissapointed no-one pointed out earlier that atlantian nations are generated nearly exclusively, but I suppose nearly everyone who uses UnitGen knows it's one line in races.txt that needs a change.
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_27_5_12.zip
Now it should be better.
elmokki
July 14th, 2012, 01:27 PM
Finally I bothered to spend quite a bit of time programming. I stumbled like at least a half of it with a retardedly simple bug though.
http://koti.kapsi.fi/~elmokki/dom3/unitgen...gen_14_7_12.zip
Exact changelist is pretty much impossible to write, but:
- I rewrote a the basic structure, which changed some things slightly
- I've tweaked probabilities in some areas slightly. At least magic weapons should be a bit more common.
- I added dual fists for sacreds! I have no idea if they work but they'll also have a tag that should give guaranteed magic weapon on them.
- I rewrote the whole troop generation system and how tags affect it. This should result in fairly funky nations sometimes (I've seen some with like 1 foot soldier and rest cav/chariots!)
- I added ability for units to become elites. Generally elites are pretty boring, but sometimes - rarely - they can get superb stats, shapeshift and magic weapon. I bet some combos or maybe more than some are ridiculously good. Some races might get pretty bland looking elites if they don't have enough cool stuff for commanders right now.
- I added ability to get special monsters. That's basically hydra and elephant for humans (it has humans on top of it after all), but the system supports or should at least support custom sprites.
elmokki
July 14th, 2012, 06:54 PM
Special items (magic stuff, half of the atlantean armor) weren't actually generating to units. Thanks to Happyfungi for the bug report.
http://koti.kapsi.fi/~elmokki/dom3/unitgen...gen_15_7_12.zip (http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_15_7_12.zip)
elmokki
July 15th, 2012, 10:29 AM
As per kianduatha's bug report:
- Commands from magic weapons weren't transfering and thus those 2x damage to demons and reanimating weren't working, but secondary effects were.
- Berserking and stealthy were hillariously common
- Mage naming for nations with mages with high levels of random paths (hopefully) improved a bit.
- The fists spawn properly dual wielded and both with some improvement over the base crappy fist (they're still not necessarily or even probably good, but you could get lucky). This required turning off a functionality that didn't really make sense anyway and as far as I know it shouldn't cause extra bugs since it was a pretty obscure thing that just made using unitgen less intuitive for people who don't know how it works (and hell, I had no idea that was causing it either)
And in addition:
- Hoburgs can't obviously use the same arbalests and crossbows as REAL MEN use. Their versions get -2 damage (10 and 14 to 8 and 12) and -1 resource cost (3 and 4 to 2 and 3).
- I added a couple of ruthlesly ripped off helmet graphics for humans and probably lizards and caelians too. That'll probably result in some funky looking lizards sometimes.
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_15_7_12-v2.zip
elmokki
July 18th, 2012, 05:40 AM
I bothered to wrote some sort of UnitGen modding tutorial. The first chapter with the IRC channel is the most useful one by far though: http://koti.kapsi.fi/~elmokki/dom3/unitgen/how_to_make_content.txt
I also woke up ludicrously early for once an spent some time coding UnitGen since I had nothing better to do:
- Fixed mounted topless black men causing errors.
- Renamed the basicnet-files to bascinets so the game actually finds and draws them
- Lizard chariots get #mounted tag
- Metal staff is sacred only weapon. It was mistakenly a normal one.
- Wooden staff is a rare infantry weapon. It was mistakenly an infantry weapon, but oh well.
- Frost Fiend / Devil secondshapes are a lot more expensive
- Magic weapon cost increases on units fixed
- Getting two or three primary mage nations is somewhat more common
- Racial magic affinities work differently now: All paths have basechance 1 by default, and the affinity number is added to them. I also tweaked existing numbers to make some paths sufficiently more common (but still by far not guaranteed) for certain races.
- I rewrote mage naming. It uses filters now in the same style as sacred naming (both use exact same system actually, though mage naming code is a bit more intricate to get a bit more presentative names). I also added some extra chanceinc commands for it so mage name part generation chances can be defined more precisely. Be warned though: I coded a short program to convert the files from the old to the new format, and it might've had some bugs. I did a quick lookup and edited some definitions to work better with the new format, but it might not be perfect.
- There are probably some undocumented changes too.
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_18_7_12.zip
elmokki
July 18th, 2012, 12:18 PM
Advanced descriptions were less work than I thought to finish. Here's an example http://koti.kapsi.fi/~elmokki/dom3/unitgen/example.txt
They should show all the stuff UnitGen generates, but some filters may be bugged, it may be unclear sometimes with filter stacking and it requires updating to advdescriptions.txt at /nations/ when new filters are added.
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_18_7_12-v2.zip
This should be a good feature for picking nations.
elmokki
July 18th, 2012, 12:45 PM
Water and Air were switched up on the non-random part of advanced descriptions. Fixed to the same build linked above. Won't break seeds.
elmokki
July 19th, 2012, 12:26 PM
http://koti.kapsi.fi/elmokki/dom3/unitgen/dev/unitgen_19_7_12.zip
Mage filters were applied two times. All of them. That's the reason for double filters on adv descriptions on mages.
Also some bugs with custom items becoming magic items were hopefully fixed.
elmokki
July 19th, 2012, 03:30 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/bearcav.png
Next version!
elmokki
July 20th, 2012, 03:22 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_20_7_12.zip
- Fixed a really major bug concerning secondshapes, their gold costs and wether they should or should not revert back.
- Spritegen works. Same bugs as before, but at least it starts again.
- Added bear cavalry!
Valerius
July 28th, 2012, 06:37 AM
Several years ago DrP was working on a price list for designing your own nation. So, just like you spend points on your pretender you could do the same for your nation. I don't remember how far he got in that project, and in any case I don't think there was a program that would generate the nation in the way your programs do.
So it occurred to me that randomly generated nations are fun but I can also see designing your own nation, in the same way you design your pretender or a character in an RPG, could be quite fun. I mention it because it seems like you've got a lot of pieces in place for such a program. You have a routine to generate sprites (that's a big one), to create the mod nation, and even a weighting system to assign values to different aspects of the nation.
Could you use that core and have a different front end that would let you build the nation to your specifications? For instance, you could choose Caelians as the race, F and N as the magic (cost would vary depending on path, highest level possible and if it was a cap only mage), and specials such as magic weapons or a boar riding wingless sacred unit.
Of course players would try to game the system but they'd be working from the same set of rules and you could always adjust point values if, for instance, everyone ends up with flying astral nations.
I'm sure I'm making it sound simpler than it is and it would probably require a lot of work but I know you work on things when you get bored so if you get bored and want try something new I think this could be interesting.
elmokki
July 28th, 2012, 06:51 AM
Several years ago DrP was working on a price list for designing your own nation. So, just like you spend points on your pretender you could do the same for your nation. I don't remember how far he got in that project, and in any case I don't think there was a program that would generate the nation in the way your programs do.
So it occurred to me that randomly generated nations are fun but I can also see designing your own nation, in the same way you design your pretender or a character in an RPG, could be quite fun. I mention it because it seems like you've got a lot of pieces in place for such a program. You have a routine to generate sprites (that's a big one), to create the mod nation, and even a weighting system to assign values to different aspects of the nation.
Could you use that core and have a different front end that would let you build the nation to your specifications? For instance, you could choose Caelians as the race, F and N as the magic (cost would vary depending on path, highest level possible and if it was a cap only mage), and specials such as magic weapons or a boar riding wingless sacred unit.
Of course players would try to game the system but they'd be working from the same set of rules and you could always adjust point values if, for instance, everyone ends up with flying astral nations.
I'm sure I'm making it sound simpler than it is and it would probably require a lot of work but I know you work on things when you get bored so if you get bored and want try something new I think this could be interesting.
It's been suggested a couple of times before already, but essentially such system would require so much user interface coding that it's fairly unlikely I'd ever bother.
I mean, it'd be all about a) tons of user interface code and b) tons of code that tries to keep the nations balanced
Even if I bothered making the user interface, the balance code itself would be hell of a lot of work. UnitGen has very few balancing code lines and even Randomocalypse only took very little into account to prevent too powerful synergies. Those synergies would be all over the place with design-your-own-nation system.
Of course if anyone wants UnitGen source code to work with - I do warn though, many parts are totally uncommented and the code varies from terrible to decent - I'm happy to share it.
What it will do without a hitch is draw anything current UnitGen is equipped to draw and write units with given commands. Nations themselves are doable, but would need some tweaking.
EDIT: It's in Java, but I'm pretty sure any potential person knows it already.
elmokki
July 28th, 2012, 07:21 AM
I made a thread on the other forum regarding pricing, but the pricing would probably need to be so complex that I'd just get frustrated trying to invent algorithms.
elmokki
July 29th, 2012, 05:48 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen...gen_29_7_12.zip (http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_29_7_12.zip)
- Fixed custom weapon generation failures
- Added some #onebattlespell mage filters
- Made unit descriptions primarily triggering of filters (filterdescriptions.txt) and from commands only if no filter explained that command. This is primarily awesome for stuff that gives multiple commands that are describe-worthy. Like glamour always gave stealth and got descriptions for both stealth and glamour. Now it'll just see there's glamour filter applied and tells the filter description and skips the command descriptions.
elmokki
July 30th, 2012, 06:53 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/agarthans.png
Work in progress!
I still want to do some code changes so I can make their primary mages / sacreds bigger agarthans and their mage gear selection is too small at the moment too.
Oh yeah, and those javelineers there have 12 ammunition javelins and no proper melee weapon. I wanted some other ranged choice to go alongside boulders. That particular sacred (bronze armored one) wasn't even too bad with 11 base precision and magical poison javelins.
elmokki
July 31st, 2012, 06:37 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_1_8_12.zip
[NEW] Agarthan race (thanks to kianduatha for name files)
[NEW] Ability to specify different poses for different tiers of mages and priests (see Agartha's poses.txt)
[FIXED] The mage pose was used to generate priests sometimes
[NEW] Ability to specify different poses for elite generation (see Agartha's poses.txt)
elmokki
August 21st, 2012, 06:34 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_21_8_12.zip
- Fixed some fairly stupid bugs that caused crashes (I found a few extras on top of the reported ones while generating a few thousand nations to find a hangup bug I accidentally coded in)
- Tweaked parameters so getting a nation where all infantry have exact same weapons but different armor should be less likely. It's still possible though.
- Tweaked cavalry generation so that stupid duplicates shouldn't happen.
- Updated naming code to understand names being generated after applied filters. Like a mage that can turn to a (were)wolf now has a fair chance to be something like "Wolf Seer" or a sacred with some elemental resists of all types might be something like "Templar of Elements"
- Agarthan sacred pose for rangeds wasn't listed as such which caused big agarthan non-sacred rangeds and small agarthan sacred rangeds to happen.
I'm extremely interested if someone finds a seed that generates 100% duplicate troops of any role. It's probably still very much possible.
elmokki
August 21st, 2012, 01:26 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_21_8_12-v2.zip
- Fixed a crash bug
- Tweaked racial generation chances slightly
elmokki
August 23rd, 2012, 03:26 PM
Done so far (release probably tomorrow)
#troopchance for races. Currently makes hoburg cavalry a bit more common and abysian cavalry a little less common.
This (happens with #description "blabla" on items):
** Temple Cavalier (Human), 65g, 13r, Icy Spear, Kite Shield, Leather Hood, Jaguar mount.
--- Waste survival and Storm power
--- The jaguar will persist even if the rider dies.
kianduatha's tweaks to Abysian cavalry (other forum has exact changelog, but basically fossil and scorpion cavalry have worse versions of their weapons now, cost 5 resources more and fossil cavalry has 5 enc instead of 2)
Mounts of sacred units will be sacred only if both conditions are fulfilled:
1) Only sacred units have such mount
2) x% chance where x is by default 100%, but can be specified with #epicness <0 to 1> on the mount item.
elmokki
August 23rd, 2012, 04:14 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/hoburgmounts.png
Oil (slime in Dom3 terms) spitting mechanical spiders and corrosively biting mechanical ants. Let's see how broken these will be. High def, good abilities, but fairly low hp and fairly expensive.
elmokki
August 24th, 2012, 10:23 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_24_8_12.zip
Fairly long list of changes, nothing hugely revolutionary per se though
Features:
- Added a pile of commands to affect sacred quality, mage paths, filter probabilities, troop type distribution and special monster (hydras etc) chances on nations based on the primary race. See races.txt.
- Items may use #description "stuff" that will be shown in advanced descriptions. This is currently used mostly for the mounts that make the unit leave a mount behind after death.
- Special monsters actually show up on both advanced descriptions and summaries.
Balance and content:
- Added salamander and mammoth special monsters (abysian and caelian exclusives)
- Added mechanized ant, mosquito and spider mounts for hoburgs. Thanks to kianduatha for comments on balance and ideas on their funky weapons.
- Weakened Abysian fossil and scorpion cavalry. All weapons have lower attack bonuses, fossilized sword does less damage and the fossil cavalry has higher encumberance.
- Cheapened human cavalries slightly.
- Made agarthan sacreds somewhat more expensive.
- Used the new race based nation generation commands to make some unit types less common for some races, made hoburgs gain more fabulous things and made abysians and atlanteans usually have slightly less magic spread.
- Hoburgs also have a hugely increased chance to get shapeshifts, especially metal men (still not massive or anything)
- Abysians and Atlanteans get shapeshifts slightly more rarely.
I'll try to add this to patch notes from now on since sometimes seeds won't break or will only break partially. These will always just be guesstimates though.
How about old seeds? Totally broken.
elmokki
August 24th, 2012, 02:11 PM
http://koti.kapsi.fi/~elmokki/dom3/unitgen..._24_8_12-v2.zip (http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_24_8_12-v2.zip)
- Mounted sacred pricing was bugged. Expect considerable increase especially on the heavily armored ones.
- Magic resistance bonuses on sacreds were bugged. Abysians and Hoburgs (12 and 14 base MR) were getting MR boosts FAR too easily. Expect quite a drop on sacred MRs on those races.
- Various minor pricing tweaks for elites and sacreds.
- There was a bug confusing nature and death randoms on descriptions sometimes.
How about old seeds? The nations have changed, but may well still be very close to the seeds from the last version.
elmokki
August 26th, 2012, 05:08 PM
Looks like the brand spanking new JRE7 on my laptop was the reason UnitGen suddently stopped working for some people. I compiled 26_8_12-v2 again with JRE6 and now it should work if 24_8_12-v2 and earlier versions did (if not, do post screenshot of error!)
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen-27_8_12.zip
Owait, apparently I didn't post any of those 26_8_12 versions here. Oh well, seeds are broken, stuff is improved, see other forums for exact changelogs. It is definitely a better place to follow development anyway since I mostly only post here to answer questions and post new versions.
elmokki
August 27th, 2012, 04:35 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_27_8_12-v2.zip
- Fixed D/N randoms in descriptions again
- Fixed mage MR boost
- Made sacred fists rarer
- Fixed second shape inheritance on things that do not use #copystats
- Added ability to control how often #magic tag is added to custom magic weapons
- Metal men had a debug chance on them and were ridiculously common
- Probably undocumented stuff again
Seeds? Mage filters are probably different. Sacred weapon #magicness too.
elmokki
August 27th, 2012, 05:42 AM
Oh crap, the newest version contains old .exe file and I failed to notice it until RagnarokX accidentally noticed it.
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_27_8_12-v3.zip
Version name: There were reindeer on the road
elmokki
August 27th, 2012, 07:43 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_27_8_12-v4.zip
- Special monsters (hydras and stuff) were totally crashing the game.
- Updated unit ordering! Atlantian rosters will not have shamblers randomly sticking out anymore, they will be grouped per race!
- Agarthan mages sometimes had very skimpy outfits (though they still usually are just naked)
Seeds? I have no idea. Probably broken.
elmokki
August 27th, 2012, 10:56 AM
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_27_8_12-v5.zip
I forgot in a debug message and accidentally added a crash bug. Looks like the quality of my coding drops drastically on a worse keyboard and a smaller display.
This version should just fix those two things so hopefully there are no new bugs.
elmokki
August 27th, 2012, 04:31 PM
- Vanir as a race
- Filter placement system tweaked: I got a hoburg nation with 7 shapeshifters and 4 total different shapes (3 wolf mages, 1 metal man mage, 1 horned serpent sacred and 1 air elemental sacred) as the pinnacle of new potential awesomeness.
- Sacred commanders are more often recruit everywhere.
- Good pile of other tweaks
- I've generated like 3000 nations without crashes!
http://koti.kapsi.fi/~elmokki/dom3/unitgen/dev/unitgen_27_8_12-v6.zip
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.