Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Roses

Pages: 1 ... 90 91 [92] 93 94 ... 131
1366
Well there is onUnitDeath(unit_id) in the eventful listing, so then I could check which unit killed them and add the counter to the killing unit. Shouldn't impact FPS more than any of the other eventful plugins (like itemsyndrome).

Global counters should have very little impact on FPS, the only question that remains is if I have two Dwarfs that increase a counter at the same time will it register both or just one. Not sure how dfhack scripts work when there are dozens being used in very close proximity (time wise) to eachother.

1367
If I could, I would outright hire you to write some Warlock spells. :)

That counter system looks extremely useful, and dozens of different effects come to mind, especially since Magic the Gathering uses tokens to the same effect. Can this somehow be applied to kills or deaths as well? If race:goblin deaths > 100, then run script that makes goblins stronger. Things like that... a level scaling system for the invaders. ^^

I actually do want to figure out how to use counters for other things as well (like kills and deaths, possibly migrant waves, megabeast attacks, any number of things). I think it should be pretty simple to do a global death/kill count (e.g. 100 goblins have died at your fort now goblins arrive with better skills/stats, or your dwarfs have killed 100 enemies here is a random gift from Armok)

What might be a little more challenging (and what I would like to ultimately do) is have a kill counter for each unit (e.g. Urist McDwarf has killed 10 enemies he now has 1 skill point to use, etc...). I have only lightly dabbled in the eventful scripts, so there may be a handy way to track kills/deaths that way. Otherwise I think I would need to do a daily check of your Dwarfs. It means the affects would be delayed, but not by too much.

1368
There is a new script coming soon which opens up a wide variety of new effects. I call it 'counters'!

Here's how it works, each unit is assigned one (or more as needed) persistent variable(s) and there are global counters available as well. These variables track 'counters' calls. The counters are then increased (or decreased) as necessary and the attached script is run, the counter is then reset to zero. A given unit can have as many counters on them as you want (although I don't know how much memory storage or anything like that persistent variables take up).

Here's an example, after 10 times the given script will run.
[SYN_CLASS:counters]
[SYN_CLASS:\UNIT_ID] <- unit id or global
[SYN_CLASS:COUNTER] <- Here is your custom counter name (i.e. FIRE, POISON, FURY, whatever you want!)
[SYN_CLASS:minimum_10] <-minimum or percentage then the number
[SYN_CLASS:1] <- amount the counter changes
[SYN_CLASS:script_args]

Here's another example, this has a percentage chance to trigger each use, with the percentage going up each use (linearly), e.g. first use is 10%, second is 20% etc...
[SYN_CLASS:counters]
[SYN_CLASS:\UNIT_ID]
[SYN_CLASS:COUNTER]
[SYN_CLASS:percentage_10]
[SYN_CLASS:1]
[SYN_CLASS:script_args]

Finally another example, this time its a global counter, everytime any unit uses this it goes up, when it reaches a hundred, BAM script
[SYN_CLASS:counters]
[SYN_CLASS:global]
[SYN_CLASS:COUNTER]
[SYN_CLASS:minimum_100]
[SYN_CLASS:1]
[SYN_CLASS:script_args]

NOTE: I have the script written, I am just currently bug testing it and playing with some neat examples (like a blood lust that increases strength on each cast, and after ten casts makes the user CRAZED]

1369
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r3
« on: March 30, 2014, 06:58:32 pm »
Ah, I didn't think about the manager or accessible tiles, good point. Will do some more testing and make sure it doesn't muck things up.

1370
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r3
« on: March 30, 2014, 05:03:21 pm »
I am playing around with upgrade-able buildings (you run a reaction and it changes the building from one into the other). I have it working just fine (assuming it is the same type and same size) but was just wondering if anyone had done this before and encountered any problems, or if anyone knows of any problems this might cause?

1371
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r3
« on: March 26, 2014, 10:03:53 am »
Is it possible to trigger PRESERVE_REAGENT depending on if a script was successful or not?

I'm guessing the answer is no, so a follow up. Can you read a reactions reagents and then re-create them depending on the script?

1372
I know some mods use it heavily (mine for one), it is interesting to know.

EXTRA_BUTCHER_OBJECT appears to drop items in a 1:1 relationship with the number of host organ parts dropped. However there appears to be a bug that only the first item has a material.

What do you mean that only the first item as a material?

1373
I didn't see it in my quick look through, but you might want to include an EXTRA_BUTCHER_OBJECTS the creature might have. It really isn't needed in the script, but for completeness sake you may consider doing it.

1374
Alrighty. I'm not sure how to investigate the vmethods either, so I will ask around and see what I can come up with.
Dissassemble, or interpose it and try to make sense of it. (or ask for someone to do it :) ). I only got that the 4th being triggered when applying(?) the effect. And the first value is probably target unit.

Hmm, might be out of my league. I know how to program for work, but I never have to deal with disassembles. Although it might be a useful learning experience.

1375
DF Modding / Re: What about a outer space fortress mod?
« on: March 20, 2014, 01:32:44 pm »
Well you could remove all vanilla workshops and reactions
This you cannot. With a few exceptions, most workshops are hard-coded.

You can modify even vanilla features with DFHack
No, you cannot. In most cases, DFHack can only add new functionality to the game; it cannot remove it. Any functionality located in virtual class methods can be overridden, but other stuff can only be removed by adding extra logic to undo them.

For example, you can use it to modify the "Add new task" list for a Carpenter's Workshop or a Craftsdwarf's Workshop, but you cannot do the same to a Farmer's Workshop or Loom. The former two workshops generate their job lists dynamically (because they're based on your raws) into a place DFHack can mess with, but the latter two are completely hardcoded.

Hmm, for some reason I thought you could remove vanilla buildings with DFHack. I stand corrected, sorry for spreading false information.

1376
DF Modding / Re: What about a outer space fortress mod?
« on: March 20, 2014, 01:57:33 am »
Well you could remove all vanilla workshops and reactions
This you cannot. With a few exceptions, most workshops are hard-coded.

You can modify even vanilla features with DFHack

1377
DF Modding / Re: What about a outer space fortress mod?
« on: March 19, 2014, 07:00:16 pm »
Well you could remove all vanilla workshops and reactions, rename all stones and animals to be alien, create all new weapons and reactions and such. I think that is what he was describing.

1378
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r3
« on: March 18, 2014, 08:52:34 pm »
I am interested in doing some research in the vmethods mentioned in this post, but am unsure how to go about it. Is there someone with more experience regarding these that could point me in the right direction to help me get started?

1379
Alrighty. I'm not sure how to investigate the vmethods either, so I will ask around and see what I can come up with.

1380
Not entirely sure how to actually check out these methods (<_<), but the fourth vmethod there looks promising.

Alright, I've got some time to investigate these vmethods. Did you have any luck Putnam?

Pages: 1 ... 90 91 [92] 93 94 ... 131