Bay 12 Games Forum

Please login or register.

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

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

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #45 on: January 10, 2014, 12:06:01 pm »

It does work in so far that the creatures can join squads. Both from adding this with reactions, or interactions.

The only question I cant answer is if this causes issues in the long run. Only long test forts can answer that. I think I will include it into the test-release of my warlocks, because most citizens are skeletons and ghouls you make yourself. People will notice if it starts crashing.

Roses, could you please share your interactions you did with this?
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 #46 on: January 10, 2014, 12:36:10 pm »

Sure, I will post them here. They aren't really tested (meaning the I don't really know what values I should change some of the things to to have the desired affect) and are more just proof of concept things as I test the capabilities for new spells.

Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).counters.winded=5000]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).counters.stunned=5000]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).counters.webbed=5000]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).counters2.hunger_timer=10000]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).counters2.exhaustion=5000]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).body.body_plan.body_parts.2.relsize=1]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).body.components.body_part_status.3.missing=true]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).status.happiness=100]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).status2.limbs_stand_count=0]
Code: [Select]
[SYN_CLASS:xlua][SYN_CLASS:df.unit.find(][SYN_CLASS:\UNIT_ID][SYN_CLASS:).status2.limbs_grasp_count=0]
These are all the ones I have tried so far (well I've tried a lot more, but these are the only ones I tried via interactions). One important thing to note is that if you do something like change the number of limbs the creature has to stand on without actually removing the limbs the creature will be unable to walk until it suffers a wound and recalculates its status. Thus some of the changes you make using this method will not be permanent, and some will. More testing is needed to see which are which.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #47 on: January 10, 2014, 12:38:30 pm »

I just found out that units spawned with spawnunit dont use interactions. Can anyone confirm this?  :-\

« Last Edit: January 10, 2014, 01:41:31 pm by Meph »
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 #48 on: January 10, 2014, 03:06:11 pm »

I just found out that units spawned with spawnunit dont use interactions. Can anyone confirm this?  :-\


Not to derail this thread, but I wonder if simply having them transform into another creature for 1 tick and then transform back would allow them to do the interactions. It could be that not all the correct flags are set when spawning and so the transformation forces the game to recalculate all of the tags.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #49 on: January 10, 2014, 06:04:48 pm »

I just found out that units spawned with spawnunit dont use interactions. Can anyone confirm this?  :-\
Yes one version of the script had that problem, i had fixed version somewhere. Also i have no idea what version is where and who is using how much flawed script :D
It was an unfilled interaction structure, first noticed by rumrusher afair.

Grimmash

  • Bay Watcher
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #50 on: January 11, 2014, 02:06:07 am »

Update: Altering hist_figure might cause a bug where you can keep playing for the current session, but loading the save crashes DF.  I did this in a community game and corrupted my save.  So if you care about the save at all, be careful :).

I might try to test this more later.

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #51 on: January 11, 2014, 07:10:10 pm »

I'm not completely done testing it

but I think you can remove an artifact from the game by setting it's id to -1

there's a few flags as well you can set...  the real test is if fort value dropped.  I believe it did when I set some of the flags and general ref's to non artifact status... but the item was still hanging around.  Setting the id to -1 had the item vanish!

...well let me rephrase that...

the item was already "vanished"... but it was still on the map.  (i.e. I had no icon for it, but I could k view it and still view it from the l - artifacts screen)...

when I set the id # of the item to -1 it dissapeared from the k view from the map

update:

actually, it still exists via the l screen... but does not exist on the map according to the x/y/z coordinates...
« Last Edit: January 11, 2014, 07:13:39 pm by thistleknot »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #52 on: January 11, 2014, 07:33:49 pm »

I would advise against messing with ids. Df is using them for very important stuff (like saving/loading, searching etc...) also gm-editor is more of a data editor, some things are better done as functions, and before doing something you might want to look over this: linky because some stuff is already done to be used quite easily.

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #53 on: January 11, 2014, 08:06:37 pm »

<ab9rf> thistlekn: you can ask DF to delete an item by setting its garbage-collect flag, iirc.
<ab9rf> just removing it from the items list doesn't actually remove it and may lead to eventual crashes
<ab9rf> although i suppose dfhack.items.remove is the "remove" convenience method that does all the "appropriate" things to actually delete it, eh

led to crash maybe?

Quote
because some stuff is already done to be used quite easily.

you mean some stuff is already done, so it's easy to use?  Or it's already been done, so it's quite easy to use?

nm... I was never quite good with english, but I get it.  And yes, it means the striked out stuff.  I'll have to see if I can find matching functions...
« Last Edit: January 11, 2014, 08:13:01 pm by thistleknot »
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #54 on: January 12, 2014, 01:42:45 pm »

update...

the only thing that is needed to trade an artifact is one flag!

gui/gm-editor (while item is highlighted)
flags
artifact - set to false

btw

setting an artifact to a hotkey, and then trying to call it after it's been traded = crash.

but upon reload, hotkey is dead.
« Last Edit: January 12, 2014, 02:30:53 pm by thistleknot »
Logged

Meph

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

Just to be very clear:

Its not possible to actually do a mood with this? I know I can set a worker to have a mood, but I mean everything, with workshop-claiming, working, artefact-creating, the entire process. The texts from Quietust seem to indicate that the answer is no.
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 :::

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #56 on: January 13, 2014, 08:17:56 pm »

Just to be very clear:

Its not possible to actually do a mood with this? I know I can set a worker to have a mood, but I mean everything, with workshop-claiming, working, artefact-creating, the entire process. The texts from Quietust seem to indicate that the answer is no.

The GM-editor alone doesn't seem to be able to do it - as Quietust pointed out, the game creates a job, allocates the materials it will use and picks the dwarf. I'm trying to test if the type of mood can be changed - ie make a fey mood a secretive mood - by seeing if the moody creature will still gain the skills. Also testing to see if you can name artifacts before the moody dwarf makes it. But it's not possible to make a dwarf go into a mood yet.

You should be able to make a dwarf make more than one artifact though - by changing the flag in the editor from 'had_mood - true' to 'had_mood - false'.


Quietust did say he was thinking about making a script or something to allow dfhack to control the artifact job creation though - or that's how i understood him anyway.


//UPDATE:

I've (stupidly) just realised you can also use the gm-editor to select items. I just unflagged an artifact as being recognised as an artifact, allowed it to be dumped, dumped it where I wanted it, then re-flagged it as an artifact again.

There are several flags for items, and you can modify sharpness, temperature, material, quality, wear, possibly also the number in the stack (possible duplication?), you can also modify the item sub-type, but I haven't tested that.


ON MOODS & ARTIFACT CREATION

I was able to test a few things on moods.

If a dwarf gets POSSESSED rather than another mood type, you can alter the moods effect, so that the dwarf still receives skills - I tested this by changing a possessed dwarfs mood to fey, immediately upon getting the notification that he was possessed.
The artifact itself did not change.

You can also name artifacts before they are created. Upon the dwarf in question being possessed I used the gm-editor to alter the artifact name, by adding RARGH! as a first name (as this is not assigned to artifacts).

The image:
Spoiler (click to show/hide)

Testing to see if I can make non-artifacts become artifacts. So far doesn't look possible.






 
« Last Edit: January 14, 2014, 01:21:54 pm by TheOnlySolitaire »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #57 on: January 14, 2014, 01:46:27 pm »

Quote
quality, wear

If only these could be called in the raws as arguments. "Fix worn clothing". "Melt non-masterwork armor/weapons". "Coat masterwork armor in runes".

I am not sure how much can be done with this, as I know of no way to affect items with what we have. Autosyndrome is for creatures...
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 :::

TheOnlySolitaire

  • Bay Watcher
  • [BRAG_ON_KILL]
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #58 on: January 14, 2014, 02:05:53 pm »

hmmm, well I don't know myself, but warmist might be able to help:
from what I understand, whatever the gm-editor can edit, a dfhack plugin/script could be made to do the same thing. I may be wrong, but I seem to remember someone (I thought it was warmist) saying that everything the gm-editor can edit, dfhack can edit too. Just not the other way round.


So unless I misunderstood, it should be possible to make a dfhack plugin/script to achieve that or something close to it. It's far beyond my understanding/know-how though.

Hopefully someone who does know can weigh in with a more informed contribution/idea...
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [GM-EDITOR] Questions, info, and uses.
« Reply #59 on: January 14, 2014, 02:10:14 pm »

Yes you are correct.
As for Meph:
1. fixing worn clothing - easy (afaik somebody is doing that? maybe changing weapon sharpness?)
2. non-masterwork armor/weapons - hard. we can't control how jobs are issues, though auto issue jobs might be possible but still hard (pathing and stuff...)
3. same issue as with 2.
Pages: 1 2 3 [4] 5 6