Bay 12 Games Forum

Please login or register.

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

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

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #75 on: January 19, 2014, 10:57:36 am »

Ah okay I see, so what Quietust posted was a reference, to show us what it can do, rather than posting so we could test/use it. That makes sense. My bad on misunderstanding I guess.
Logged

Quietust

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

The reason I wrote the plugin was that the original poster was suggesting that you could use gm-editor (which is really just a simple structure editor) to start a strange mood and I wanted to show what was actually necessary to properly start a mood. That, and I also wanted to know exactly what happened during strange mood creation in version 0.34.11 (I've only studied the logic in detail for 23a and 40d) so the information on the wiki can be made more accurate.

In order to run the plugin, you'll need to grab the latest version from my repository (I just updated it to allow overriding the mood skill and to use a better RNG) and the latest XML from my df-structures fork and then compile DFHack. Alternatively, you can download a copy here (rev 7f14e109fa239c0919a150d6ab28964a774fc24d).
« Last Edit: January 19, 2014, 09:41:37 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.

TortuousAugur

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #77 on: January 20, 2014, 02:58:41 am »

Well, I'm not able to make any permanent changes to my character's curse settings. Every time I change something, it changes back to what it was to begin with... I imagine that there is a setting somewhere else that writes all the curse settings, but I don't know what or where it is.  :-\
Logged

Quietust

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

I imagine that there is a setting somewhere else that writes all the curse settings, but I don't know what or where it is.  :-\
It is for this reason that gm-editor isn't really a useful tool for non-experts - if you want to use it to modify something complicated, you have to know ALL of the things that need to be changed and then change each of them correctly (and possibly also in the correct order), just like with my previous example of strange moods. Modifying a curse would require not only changing the fields in unit.curse but likely also editing the active syndrome so that it doesn't simply reapply its original modifications.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #79 on: January 20, 2014, 09:35:49 am »

Quietust: Can I ask you a favor? Could you please have a look at warmists spawnunit script, and see what can be done about historical figures?

At the moment there is a pretty big issue with the spawned units: They can neither become nobles, nor be drafted into the military. But as soon as they make a masterwork item, or kill a unit, or become historical figures some other way, it works.

Warmist tried to fix it at some point, but it resulted in crashes. Maybe you can figure out how to do so, since you dont seem to have a problem writing something as complex as that mood-plugin.
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 :::

TortuousAugur

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #80 on: January 20, 2014, 07:33:44 pm »

I imagine that there is a setting somewhere else that writes all the curse settings, but I don't know what or where it is.  :-\
It is for this reason that gm-editor isn't really a useful tool for non-experts *snip*
Yeah, I figured as much after stuff wasn't staying like I set it. I'm not educated enough in this curriculum to do anything other then wait for someone to create a dfhack plugin or script that is a little more user friendly then the base interface I'm trying to deal with now.  :P


Edit:

After poking around in the editor some more, I found something a little quirky. Maybe my pointing this out, it can help someone else figure the curse/syndrome relationship out, or at least I hope so.

I have a unit_wound in my body tab with syndrome_id 179. I'm thinking this is my "lamia" vampire curse. While I can't find that number anywhere in my curse tab, I did find it under the syndrome tab, under "syndromes -> active -> unit_syndrome" as the "type" entry. It's also the only number in the "unk_7d4" tab, located directly under "active" inside syndromes.

I'm fairly certain that deleting the top entries inside syndromes and body/wounds would probably clean a unit of vampirism or lycanthropy.
This was not the case. Deleted entries repopulated after sleeping. Guess curses are stored elsewhere?  ::)
« Last Edit: January 22, 2014, 03:03:34 am by TortuousAugur »
Logged

Uzu Bash

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #81 on: July 06, 2017, 02:11:13 pm »

How do I use "Find a value by entering a predicate"? I'm trying to narrow down the units list by race, for example, but entering "race,572" doesn't do anything, not even feedback telling me what that didn't do. Is there some non self-evident format required?
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #82 on: July 07, 2017, 03:27:50 am »

predicate is a function that returns "true" on some values. Imagine that you have "function(v) return <your text here> end". So if i remember correctly you would need to type in v.race==572

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #83 on: July 07, 2017, 03:30:59 am »

Quietust: Can I ask you a favor? Could you please have a look at warmists spawnunit script, and see what can be done about historical figures?

At the moment there is a pretty big issue with the spawned units: They can neither become nobles, nor be drafted into the military. But as soon as they make a masterwork item, or kill a unit, or become historical figures some other way, it works.

Warmist tried to fix it at some point, but it resulted in crashes. Maybe you can figure out how to do so, since you dont seem to have a problem writing something as complex as that mood-plugin.
Afaik it's not a problem of unit, it's that it's not added to the civ/group etc... Though that might be not enough. I remember having problems with multirace fort. It really did not want some units in places of power.

Uzu Bash

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #84 on: July 07, 2017, 07:27:31 pm »

predicate is a function that returns "true" on some values. Imagine that you have "function(v) return <your text here> end". So if i remember correctly you would need to type in v.race==572
That gives the first one that meets the condition. But how would I get an inclusive list of all of them?


EDIT: Also, when searching for the player's army, v.flags is a bit array, and I'm not sure how to reference the members. v.flags.player==true or v.flags[player] or
  • doesn't find anything. I am on the fast travel screen when I attempt this.
« Last Edit: July 07, 2017, 08:12:50 pm by Uzu Bash »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #85 on: July 08, 2017, 03:52:15 pm »

predicate is a function that returns "true" on some values. Imagine that you have "function(v) return <your text here> end". So if i remember correctly you would need to type in v.race==572
That gives the first one that meets the condition. But how would I get an inclusive list of all of them?


EDIT: Also, when searching for the player's army, v.flags is a bit array, and I'm not sure how to reference the members. v.flags.player==true or v.flags[player] or
  • doesn't find anything. I am on the fast travel screen when I attempt this.
Afaik there is no way to filter with predicate. Somebody should write that function in :P

You need to travel one step to create player army. But the correct way is either "v.flags.player" or "v.flags.player==true" or "v.flags[0]" or v.flags["player"] (not sure about that last one) but not v.flags[player] (i.e. player would be nil and then you would index flags with nil which is always an error afaik)

Altaree

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #86 on: July 14, 2017, 02:43:29 pm »

Try out 'gui/gm-editor world'

I really wanted to get rid of seed but a noble really likes bags.  This command let me get to the mandates and set them to expire.

I would like to add that I REALLY LOVE this script!  It really helps when I need to figure out where something is set when writing my other scripts.  My previous method was using 'print' and 'printall' to explore the data structures one element at a time.
THANK YOU!
« Last Edit: July 14, 2017, 02:45:00 pm by Altaree »
Logged
Dan Pearson:
This is a game which calculates the volume of blood in every creature it generates so it knows how much alcohol it would have to consume to get drunk, an update which, remarkably, ended up covering people's fortresses in cat vomit.
Pages: 1 ... 4 5 [6]