Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 6

Author Topic: [GM-EDITOR] Questions, info, and uses.  (Read 25518 times)

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #15 on: January 09, 2014, 02:32:06 pm »

snip
Thanks Quietust for the info. I did test the strange moods and the mooded dwarves just carried on with their normal business, but with the mood descriptor etc.

You'll have to forgive me, I actually know nothing about programming/coding or what have you, I literally just tinker with things and see what it does blindly.
With that in mind, where would I find df.job_skill?
Also, I suspected that the mood wasn't triggering because the job wasn't being queued like other jobs were. There doesn't seem to be a flag or value to edit with the editor that would allow control over what job was being undertaken... Unless you can offer any suggestions it seems its not possible..
 

snip

Okay, I'll spend some time tomorrow and tonight seeing what I can tinker with and report back.

There is a flag that so far, seems to just remove the creature from the game, sometimes with a game report such as '[name] is no longer enraged', but they disappear completely. It may have deeper implications than I am seeing however, as the flag is 'dead - true/false'. There are also merchant and diplomat tags, I'll test them too..



IF ANYONE WANTS TO KNOW IF SOMETHING IS POSSIBLE, post it here and I'll see if any values achieve what you are after while I'm science-ing.
NOTE: I'm barely a modder, so I don't think like you guys do, so letting me know what it is you want to happen helps me to know what to look out for when testing stuff.
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #16 on: January 09, 2014, 02:46:02 pm »

I've used the gm editor (to find the data structures that needed to be edited) to do lua scripting to edit attributes (see my 'unfinished' My Scripts in my signature), I'm surprised it can't be used in conjunction with something like autosyndrome to affect animals to go "wild".  Although, I don't know how a dwarf could be selected by a workshop order from lua (or even an animal, normally I just grab an animal with the k cursor)... but I do know of ways to cycle through all dwarf's/animals.  However, targetting one from a nearby shop, I'm not sure how that would be done.

Anyways

I would love to know if there's a way to turn an artifact into a regular item.  However, I think I may have answered that already, as they are listed in there own artifact submenu.  But maybe, I can remove it as an artifact if I delete it from the menu (alt i inserts, so does alt x or alt d remove?)
« Last Edit: January 09, 2014, 02:52:04 pm by thistleknot »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #17 on: January 09, 2014, 03:11:42 pm »

I've used the gm editor (to find the data structures that needed to be edited) to do lua scripting to edit attributes (see my 'unfinished' My Scripts in my signature), I'm surprised it can't be used in conjunction with something like autosyndrome to affect animals to go "wild".  Although, I don't know how a dwarf could be selected by a workshop order from lua (or even an animal, normally I just grab an animal with the k cursor)... but I do know of ways to cycle through all dwarf's/animals.  However, targetting one from a nearby shop, I'm not sure how that would be done.

Anyways

I would love to know if there's a way to turn an artifact into a regular item.  However, I think I may have answered that already, as they are listed in there own artifact submenu.  But maybe, I can remove it as an artifact if I delete it from the menu (alt i inserts, so does alt x or alt d remove?)
alt+d
There is "?" for help.
I don't think that it will work. I think you could change it into normal item by: setting a flag in item to false (is artifact or sth...) and removing general_ref from said item. Though it might result in crash...

Roses

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #18 on: January 09, 2014, 03:16:35 pm »

With just some very preliminary testing I have done the following with interactions;

changed a dwarfs happiness level
took away the ability to stand
took away the ability to grasp
made a unit hungry
made a unit thirsty
made a unit exhausted
made a unit winded
made a unit stunned
made a unit webbed (without actual webs) (I'm thinking like a mind web)
shrunk a dwarfs head (had to look up what body part it actually way)
removed body parts from the dwarf (again need to know the body part, all gm-editor gives is numbers)

There are many other things I will try when I find time, but I mainly tried to stick to things that can't be done with current interactions (there were many counters that can be changed for things like paralysis, numbness, pain, etc... And of course all the stats can be changed too).

I didn't continue the adventure mode for long, so I don't know if there is any problems that arise from tinkering with them.

Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #19 on: January 09, 2014, 03:31:16 pm »

When you say interactions, you mean interactions that the AI would use themselves? Sounds like you jumped far ahead of me, with SyndromeTrigger (?)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Roses

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #20 on: January 09, 2014, 03:36:14 pm »

When you say interactions, you mean interactions that the AI would use themselves? Sounds like you jumped far ahead of me, with SyndromeTrigger (?)

Yeah (well I don't know about AI, I tested it all in adventure mode by giving the interactions to my dwarf). I think SyndromeTrigger is easier to test than AutoSyndrome (although really the only difference is needing to build a building and queue a reaction). I don't think there should be any trouble doing all of the same things with AutoSyndrome since they both use the \COMMAND syntax.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #21 on: January 09, 2014, 03:41:49 pm »

With that in mind, where would I find df.job_skill?
There currently doesn't seem to be very good support for examining enums in Lua, but you can run "lua !df.job_skill[X]" for various values of X to determine what they mean.

Also, I suspected that the mood wasn't triggering because the job wasn't being queued like other jobs were. There doesn't seem to be a flag or value to edit with the editor that would allow control over what job was being undertaken... Unless you can offer any suggestions it seems its not possible..
The mood wasn't triggering because the job didn't even exist - as I explained, at same time that the game sets the unit's mood type, it also creates the Strange Mood job, populates it with all of the item requests, and attaches the job to the unit. This cannot be done using gm-editor alone - in order to properly trigger a strange mood, you would need a rather complicated Lua script (or C++ plugin, which I'm thinking of writing).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #22 on: January 09, 2014, 04:39:37 pm »

snip
Okay thanks Quietust. I hope you do write that script, but I wouldn't ask you to do something that might be frustrating and time consuming...
Good luck if you do though :)


OKAY - here are my current findings on flags and a bit more besides:


You can change caste using gm-editor = stable

You can change sex using gm-editor = stable (valid values are 0 and 1)

You can KIND OF change race using gm-editor = stable, but creature will instantly 'transform' back into their original race.

the flag 'marauder' changes a creature into 'hostile'. (quicker than fiddling with invader_id?)

the flag 'merchant' seems to make a dwarf friendly - possibly related to the friendly-trader migrant bug.

the flag 'left' makes a dwarf disappear - probably what the game uses to make merchants/diplomats/wagons leave once they reach the edge of the map. USEFUL FOR MEPH?

'incoming' doesnt seem to do anything - possibly related to incoming traders or migrants?

'diplomat' flag seems to correctly list the creature as a diplomat, but you instantly get the ''diplomat leaves unhappy'' announcement like a normal diplomat will do. DOES actually leave though. Flagging a creature as a diplomat, then unflagging them after the announcement does not make them continue to leave. USEFUL FOR MEPH?

'zombie' and 'skeleton' don't seem to affect creatures. Possibly works just like ghosts do, ie, select the undead zombie/skeleton/ghost, then change the flag from true to false to turn them back to human form before they die of missing bodyparts etc. COULDNT TEST PROPERLY YET.

'projectile' seems to turn the creature literally into a projectile. Unfired. So they are removed from lists, you can no longer (v)iew them and they just lie there as inanimate objects... OR this may be how the game handles when a creature is launched by a force - as they are not selectable in that moment, so they must be in this state. Unfortunately, with just the flag change, they are in a permanent state of limbo, floating outside of normal physics.

'active_invader' makes the creature an active invader - NOTE the SIEGE tag in the top right does not appear though. Also, the creatures seem bugged, as they don't move much. Possibly like the way siegers bunch together and take a long time to reach the fortress, but during the entire time testing, with a clear open path to my dwarves, they did nothing but mill about, like dwarves do in a meeting hall.

INTERESTING TO NOTE - dwarves lose their fort-related needs when in hostile/invader, so it can extend the lives of dwarves who are near death maybe...? There are better ways to do this though.

'hidden in ambush' will do nothing if the creature is of your civ. with the active invader tag however, the creature disappears as expected - still seems to be stuck like the other invader flagged creatures however. MAYBE because of invader_id? or lack of civ id? will test more when I have more time.

'caged' removes the creature tested on - possibly how the cage removes the creature from its normal pathing etc. Not sure what happened to the cageless caged test subject though... EDIT - he's still listed in the (u)nit list, but he is now: 'no job(caged)'. Still missing from the world though.

using the 'tame' flag on citizens makes them ''(semi-wild)'' but otherwise seem to act as normal citizens...

the 'cleanup' flags 1, 2, and 3, seem to just remove a creature from the game.

'unwanted_visitor' seems to make a creature hostile AND path towards your dwarves - in conjunction with invader, makes the creature act strangely - just pathing randomly around despite being listed as invader.

the 'vision' flags don't seem to take effect on a creature, but the creature I blinded with the flag didn't seem to react to the wild wolf I put into his test chamber - normally citizens run all over the place. So maybe it does work, but it won't display so on the (v)iew>(w)ound, or the thoughts and feelings page.

the 'breathing' flags seem to work - setting breathing_problem leaves a creature permanently winded.

'visitor' lists a creature in the (u)nits screen as a visitor.

'announce_titan' flag is interesting. It seems to work exactly as a normal titan announcement, but it gives the creature description, i tested on an unnamed human, and it announced 'The Human has come! A medium-sized creature prone to great ambition'.

'scuttle' transformed the human into a wagon instantly, which when unpaused, instantly scuttled. There were no notifications of the transformation or the scuttling. Left behind a human corpse, unfortunately. Was looking forward to a wagon corpse.

'ghostly' transforms a creature into an 'undead' Ghostly form of itself. Un-flagging an otherwise unharmed creature as 'ghostly', just brings them back to life like nothing happened.



that is it for flags for the moment.

ATTRIBUTES
I also messed about quickly with attributes.
I managed to make a dwarf 'unfathomably weak' by setting his strength to 1, which I have never seen before. Will test more if really necessary - but gm-editor can change attributes, and attribute-tissue whatever that is.

AGE
you can change the birth_year, made a spawned creature go from the standard 1 year old, to 10. Changing them back to age etc does not make them children.

CURSES
you can add curses, which seem to be able to allow you to add curse related tags, such as NOEXERT and OPPOSED_TO_LIFE etc.
will test this more, but preliminary testing seems to suggest there are maybe flags or other values that need changing to make this work, or at least it doesn't work on civ members.
EDIT: Tested on a 'marauder' flagged elf, and it worked fine.

HISTORICAL FIGURES
doesn't seem to work just yet. There are 2 flags, and 2 id's. I used really large unlikely numbers as the id's, but they could have been duplicate to another creature. Shouldn't have been, but possible.
Will keep testing...




Hope this stuff helped. I will dig some more though.









« Last Edit: January 09, 2014, 05:04:34 pm by TheOnlySolitaire »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #23 on: January 09, 2014, 04:48:33 pm »


'caged' removes the creature tested on - possibly how the cage removes the creature from its normal pathing etc. Not sure what happened to the cageless caged test subject though... EDIT - he's still listed in the (u)nit list, but he is now: 'no job(caged)'. Still missing from the world though.


Interesting, I wonder if they can perform actions on themselves while having the caged flag. Would allow for a D&D banish type spell. Remove them from the world, then a set amount of time later the caged flag gets set to False again.
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #24 on: January 09, 2014, 04:57:21 pm »

You can KIND OF change race using gm-editor = stable, but creature will instantly 'transform' back into their original race.

Go into the gm-editor, go down to the 'enemy' option. From here you can change their normal_race and their normal_caste. After unpausing they will transform into the new creature, and will not transform back. Their race in the main tab will change to match whatever you changed it to in the enemy tab.

No idea what were_race or were_caste do though.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #25 on: January 09, 2014, 05:16:42 pm »

Updated gm-editor: now it shows enum value (in parentheses) if field has an enum. Also with shift+enter you can select which value to enter
get it here
e.g. overwrite the scripts/gui/gm-editor.lua

« Last Edit: January 09, 2014, 05:48:44 pm by Warmist »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #26 on: January 09, 2014, 05:21:50 pm »

'zombie' and 'skeleton' don't seem to affect creatures. Possibly works just like ghosts do, ie, select the undead zombie/skeleton/ghost, then change the flag from true to false to turn them back to human form before they die of missing bodyparts etc. COULDNT TEST PROPERLY YET.
Back in version 0.31 and earlier, these flags turned the creature into a Zombie or Skeleton, respectively; version 0.34 replaced these with syndromes and interactions, so the flags no longer do anything.

'projectile' seems to turn the creature literally into a projectile. Unfired. So they are removed from lists, you can no longer (v)iew them and they just lie there as inanimate objects... OR this may be how the game handles when a creature is launched by a force - as they are not selectable in that moment, so they must be in this state. Unfortunately, with just the flag change, they are in a permanent state of limbo, floating outside of normal physics.
The actual velocity information is stored in a separate object of type "proj_unitst", and linking them together correctly is fairly straightforward if you know what you're doing.

'hidden in ambush' will do nothing if the creature is of your civ. with the active invader tag however, the creature disappears as expected - still seems to be stuck like the other invader flagged creatures however. MAYBE because of invader_id? or lack of civ id? will test more when I have more time.
It most definitely does have an effect on your own dwarves - they still appear on your screen, but they become hidden from enemies and also move more slowly. If you examine a Hunter who is actively hunting a wild animal, you will see that it has this flag set, and the same is true if you check yourself in Adventurer mode while sneaking.

'caged' removes the creature tested on - possibly how the cage removes the creature from its normal pathing etc. Not sure what happened to the cageless caged test subject though... EDIT - he's still listed in the (u)nit list, but he is now: 'no job(caged)'. Still missing from the world though.
The unit disappears because it's expecting it to be located inside a cage somewhere, but you haven't actually told it which cage that happens to be. If you give the unit a "general_ref_building_cagedst" pointing at the cage (and give the cage a "general_ref_contains_unitst" pointing back at the unit), then the unit will show up inside the cage.

the 'vision' flags don't seem to take effect on a creature, but the creature I blinded with the flag didn't seem to react to the wild wolf I put into his test chamber - normally citizens run all over the place. So maybe it does work, but it won't display so on the (v)iew>(w)ound, or the thoughts and feelings page.

the 'breathing' flags seem to work - setting breathing_problem leaves a creature permanently winded.
Most of those flags are just cached values to determine how the unit's behavior should be affected - if the unit gets injured in any way (or some other event happens), those flags will be recalculated based on the unit's current wounds (e.g. the Strange Mood logic recalculates wounds in order to exclude dwarves who can't pick up items).

If you look at the df-structures XML files, you can find lots of additional information.
« Last Edit: January 09, 2014, 05:25:33 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Nuttycompa

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #27 on: January 09, 2014, 07:49:06 pm »

Some non-modder idea about how to make spawn citizen historic.
Can we make them spawn with Mood so they want to create artifact. Set that mood to use one specific skill and set the meterial they will use then spawn it with them. So now we got spawn unit and spawn meterial, the spawn unit instantly have mood grab the meterial and begin mysterious construction. Boom they become historic figure.


Logged

Grimmash

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #28 on: January 09, 2014, 11:51:06 pm »

Editing hist_figure_id and hist_fig_id2 to the same number makes a unit squad assignable.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #29 on: January 10, 2014, 03:42:49 am »

Quote
- still seems to be stuck like the other invader flagged creatures however. MAYBE because of invader_id? or lack of civ id? will test more when I have more time.
Invaders follow the squad leader, so if they dont have one, they dont know how to pathfind to anywhere.

Quote
'ghostly' transforms a creature into an 'undead' Ghostly form of itself. Un-flagging an otherwise unharmed creature as 'ghostly', just brings them back to life like nothing happened.
This is awesome for a ghost-spell.

Quote
the flag 'marauder' changes a creature into 'hostile'. (quicker than fiddling with invader_id?)

the flag 'merchant' seems to make a dwarf friendly - possibly related to the friendly-trader migrant bug.

the flag 'left' makes a dwarf disappear - probably what the game uses to make merchants/diplomats/wagons leave once they reach the edge of the map. USEFUL FOR MEPH?
These three are nice. Spawn unit, set marauder: You managed to spawn a hostile unit, which is currently not possible with spawnunit. Second one is nice for Titans or Forgotten Beasts: Charm-Spell, turns monster friendly. Last one is nice, because it could allow my Townportal workshop to send migrants back to the mountainhomes, without corpses and bad thoughts. Go hom Urist, we dont need cheesemakers here.

Quote
'announce_titan' flag is interesting. It seems to work exactly as a normal titan announcement, but it gives the creature description, i tested on an unnamed human, and it announced 'The Human has come! A medium-sized creature prone to great ambition'.
That one is nice for hidden threats. For example I do have some dwarven castes that transform into monsters. Would be nice if they get a proper introduction. Or when you construct your own colossus. As soon as its finishes, the game booms: The Colossus has come, a great dwarven warmachine.

Quote
You can change caste using gm-editor = stable
Does it force a transformation? I change castes in the mod a lot, for guilds and mages and priests and all that. The problem is that transformations fully heal the creatures every time. Its an exploit. If this changes the caste without healing the creature... that would be nice.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::
Pages: 1 [2] 3 4 ... 6