.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $9.00
Bronze- Save $9.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

Reply
 
Thread Tools Display Modes
  #61  
Old April 11th, 2012, 02:51 PM

elmokki elmokki is offline
Second Lieutenant
 
Join Date: Aug 2008
Posts: 408
Thanks: 11
Thanked 209 Times in 57 Posts
elmokki is on a distinguished road
Default Re: UnitGen - Random nations with procedural sprites!

Quote:
Originally Posted by Ragnarok-X View Post
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.
__________________
UnitGen - randomly generated nations with randomly generated sprites
http://forum.shrapnelgames.com/showthread.php?t=48341
Reply With Quote
  #62  
Old April 11th, 2012, 04:51 PM
Ragnarok-X's Avatar

Ragnarok-X Ragnarok-X is offline
Major General
 
Join Date: Jan 2004
Location: Germany / Bielefeld
Posts: 2,035
Thanks: 33
Thanked 18 Times in 12 Posts
Ragnarok-X is an unknown quantity at this point
Default Re: UnitGen - Random nations with procedural sprites!

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 ?
Reply With Quote
  #63  
Old April 12th, 2012, 02:10 AM

elmokki elmokki is offline
Second Lieutenant
 
Join Date: Aug 2008
Posts: 408
Thanks: 11
Thanked 209 Times in 57 Posts
elmokki is on a distinguished road
Default Re: UnitGen - Random nations with procedural sprites!

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
Code:
#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.
__________________
UnitGen - randomly generated nations with randomly generated sprites
http://forum.shrapnelgames.com/showthread.php?t=48341

Last edited by elmokki; April 12th, 2012 at 02:20 AM..
Reply With Quote
  #64  
Old April 12th, 2012, 01:21 PM
Ragnarok-X's Avatar

Ragnarok-X Ragnarok-X is offline
Major General
 
Join Date: Jan 2004
Location: Germany / Bielefeld
Posts: 2,035
Thanks: 33
Thanked 18 Times in 12 Posts
Ragnarok-X is an unknown quantity at this point
Default Re: UnitGen - Random nations with procedural sprites!

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.
Reply With Quote
  #65  
Old April 12th, 2012, 01:25 PM
Ragnarok-X's Avatar

Ragnarok-X Ragnarok-X is offline
Major General
 
Join Date: Jan 2004
Location: Germany / Bielefeld
Posts: 2,035
Thanks: 33
Thanked 18 Times in 12 Posts
Ragnarok-X is an unknown quantity at this point
Default Re: UnitGen - Random nations with procedural sprites!

Code:
#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>

Code:
--- 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
Reply With Quote
  #66  
Old April 12th, 2012, 04:23 PM
Ragnarok-X's Avatar

Ragnarok-X Ragnarok-X is offline
Major General
 
Join Date: Jan 2004
Location: Germany / Bielefeld
Posts: 2,035
Thanks: 33
Thanked 18 Times in 12 Posts
Ragnarok-X is an unknown quantity at this point
Default Re: UnitGen - Random nations with procedural sprites!

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.
Attached Files
File Type: rar mounts.rar (8.2 KB, 27 views)

Last edited by Ragnarok-X; April 12th, 2012 at 04:37 PM..
Reply With Quote
  #67  
Old April 12th, 2012, 05:29 PM

elmokki elmokki is offline
Second Lieutenant
 
Join Date: Aug 2008
Posts: 408
Thanks: 11
Thanked 209 Times in 57 Posts
elmokki is on a distinguished road
Default Re: UnitGen - Random nations with procedural sprites!

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.

Code:
#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.
__________________
UnitGen - randomly generated nations with randomly generated sprites
http://forum.shrapnelgames.com/showthread.php?t=48341
Reply With Quote
  #68  
Old April 13th, 2012, 12:04 PM
Ragnarok-X's Avatar

Ragnarok-X Ragnarok-X is offline
Major General
 
Join Date: Jan 2004
Location: Germany / Bielefeld
Posts: 2,035
Thanks: 33
Thanked 18 Times in 12 Posts
Ragnarok-X is an unknown quantity at this point
Default Re: UnitGen - Random nations with procedural sprites!

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 ?
Reply With Quote
  #69  
Old April 13th, 2012, 01:28 PM

kianduatha kianduatha is offline
Second Lieutenant
 
Join Date: Jun 2009
Posts: 403
Thanks: 15
Thanked 28 Times in 21 Posts
kianduatha is on a distinguished road
Default Re: UnitGen - Random nations with procedural sprites!

Quote:
Originally Posted by Ragnarok-X View Post
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.
Reply With Quote
  #70  
Old April 13th, 2012, 04:06 PM

elmokki elmokki is offline
Second Lieutenant
 
Join Date: Aug 2008
Posts: 408
Thanks: 11
Thanked 209 Times in 57 Posts
elmokki is on a distinguished road
Default Re: UnitGen - Random nations with procedural sprites!

http://koti.kapsi.fi/elmokki/dom3/un...en_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.
__________________
UnitGen - randomly generated nations with randomly generated sprites
http://forum.shrapnelgames.com/showthread.php?t=48341
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:47 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2019, Shrapnel Games, Inc. - All Rights Reserved.