Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 22 23 [24] 25 26 ... 42

Author Topic: [DFHack] Roses' Script Collection Updated 5/4/15  (Read 119768 times)

TheDorf

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #345 on: September 29, 2014, 11:00:59 am »

Awesome job with the help section! A huge "thank you" is in place for this, as it will make life a lot easier for noobs like me. :)
« Last Edit: September 29, 2014, 11:07:06 am by TheDorf »
Logged
I love this community. Somebody asks "hay guise how do i tame shark", and then everybody is like "why don't we fling sharks at things with complex mechanical devices?".

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #346 on: September 29, 2014, 11:06:12 am »

Actually I just wrote that all, since the one on github is out of date. I will be copying that into github though.
Logged

TheDorf

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #347 on: September 29, 2014, 11:07:37 am »

Actually I just wrote that all, since the one on github is out of date. I will be copying that into github though.

Just noticed, and edited accordingly. Awesome work at any rate. :)

Edit: Still unable to get it to work though xD Even tried the steel bolt thing :c If anybody could post a copy-paste example, that'd be awesome. This should be compatible with DFHack 0.40.13-r1, right?
« Last Edit: September 29, 2014, 11:59:21 am by TheDorf »
Logged
I love this community. Somebody asks "hay guise how do i tame shark", and then everybody is like "why don't we fling sharks at things with complex mechanical devices?".

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #348 on: September 29, 2014, 12:08:52 pm »

Yes it should be, there is still a problem with interaction-trigger that I am not understanding. Asked expwnent (the author of interaction-trigger) but he is busy at the moment so I don't expect an answer any time soon. As far as I know, the examples I posted *should* work just fine. That is to say, they work if I take out the interaction-trigger part and just run them via command line. For instance,
Code: [Select]
wrapper -unitSource 0 -unitTarget 1 -script [ special/projectile -unit_source !SOURCE -unit_target !TARGET -item AMMO:ITEM_AMMO_BOLTS -mat STEEL -number 1 ] -radius 3,3,0 -maxtargets 5Works just fine in the arena (after spawning at least two units). But
Code: [Select]
modtools/interaction-trigger -onAttackStr "shoots a bolt of steel" -command [ wrapper -unitSource \\ATTACKER_ID -unitTarget \\DEFENDER_ID -script [ special/projectile -unit_source !SOURCE -unit_target !TARGET -item AMMO:ITEM_AMMO_BOLTS -mat STEEL -number 1 ] -radius 3,3,0 -maxtargets 5 ]Doesn't trigger.
Logged

TheDorf

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #349 on: September 29, 2014, 02:28:04 pm »

Yes it should be, there is still a problem with interaction-trigger that I am not understanding. Asked expwnent (the author of interaction-trigger) but he is busy at the moment so I don't expect an answer any time soon. As far as I know, the examples I posted *should* work just fine. That is to say, they work if I take out the interaction-trigger part and just run them via command line. For instance,
Code: [Select]
wrapper -unitSource 0 -unitTarget 1 -script [ special/projectile -unit_source !SOURCE -unit_target !TARGET -item AMMO:ITEM_AMMO_BOLTS -mat STEEL -number 1 ] -radius 3,3,0 -maxtargets 5Works just fine in the arena (after spawning at least two units). But
Code: [Select]
modtools/interaction-trigger -onAttackStr "shoots a bolt of steel" -command [ wrapper -unitSource \\ATTACKER_ID -unitTarget \\DEFENDER_ID -script [ special/projectile -unit_source !SOURCE -unit_target !TARGET -item AMMO:ITEM_AMMO_BOLTS -mat STEEL -number 1 ] -radius 3,3,0 -maxtargets 5 ]Doesn't trigger.

Oh, right, sorry. Thought it was only the "special-x" ones that weren't working, but thank you for the info. If you figure it out, let me know - I'll be needing triggers not only for my spells, but also for the script that I'm working on.
Logged
I love this community. Somebody asks "hay guise how do i tame shark", and then everybody is like "why don't we fling sharks at things with complex mechanical devices?".

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #350 on: October 02, 2014, 09:45:44 am »

I will try to figure it out, but can't for the life of me see what the problem is.

As for my other work, I was hoping to get an update out yesterday, but that obviously didn't happen. I am trying to get an update out sometime this week still.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #351 on: October 14, 2014, 05:23:12 pm »

Well I managed to get the "civilizations" scripts up and working. You can add and remove item types, materials (both inorganic and organic), pets/mounts/minions, and noble positions.

Unfortunately I seem to get a crash to desktop when making some alterations and have not been able to nail down exactly what causes the crashes (I think it has to do with removing positions while a unit is still that position). I'll upload a version with a little help section for people that want to start looking at it while I nail down exactly what causes the CTD.

Also, I fixed a rather large error in the class system that caused most things not to work. I will be uploading that fix as well. I think Putnam is the only one currently using the system (if he still is) so hopefully there were no major issues from the bug.

For the future, the "events" script is going well. Allowing for much more customization in your world. Including, but not limited to, artificial sieges and megabeast attacks that occur randomly.

EDIT: Yeah, don't delete nobles from an entities records. There ends up being a lot of loose ends that cause the save to become corrupted and unplayable. Adding nobles works though!
« Last Edit: October 15, 2014, 11:53:11 am by Roses »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #352 on: October 15, 2014, 12:48:09 pm »

Ok, the civilization scripts are now uploaded. They work the same way that the class system does, namely that you need to have a file named civilizations.txt in your raw/objects folder. That file tells the game how to treat the different entities that populate the world. An example is included in my packaged scripts, and pasted below for easy reference

Code: [Select]
[CIV:PLAINS]
[NAME:humans from the north]
[LEVELS:1]
[LEVEL_METHOD:YEARLY:100]
[LEVEL:0]
 [LEVEL_NAME:started in the stone age]
 [LEVEL_REMOVE:CREATURE:PET:ALL:ALL]
 [LEVEL_REMOVE:CREATURE:WAGON:ALL:ALL]
 [LEVEL_REMOVE:CREATURE:MOUNT:ALL:ALL]
 [LEVEL_REMOVE:CREATURE:PACK:ALL:ALL]
 [LEVEL_REMOVE:CREATURE:MINION:ALL:ALL]
 [LEVEL_REMOVE:CREATURE:EXOTIC:ALL:ALL]
 [LEVEL_REMOVE:CREATURE:FISH:ALL:ALL]
 [LEVEL_REMOVE:CREATURE:EGG:ALL:ALL]
 [LEVEL_REMOVE:ITEM:WEAPON:ALL]
 [LEVEL_REMOVE:ITEM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:ALL:ALL]
 [LEVEL_ADD:CREATURE:PET:WOLF:ALL]
 [LEVEL_ADD:CREATURE:MOUNT:HORSE:ALL]
 [LEVEL_ADD:ITEM:WEAPON:ITEM_WEAPON_SPEAR]
 [LEVEL_ADD:ITEM:INORGANIC:STONE:GRANITE]
 [LEVEL_ADD:ORGANIC:LEATHER:HORSE:LEATHER]
[LEVEL:1]
 [LEVEL_NAME:entered the copper age]
 [LEVEL_CHANGE_METHOD:YEARLY:50]
 [LEVEL_ADD:INORGANIC:METAL:COPPER]
 [LEVEL_ADD:ITEM:WEAPON:ITEM_WEAPON_SHORT_SWORD]
 [LEVEL_ADD_POSITION:MONARCH2]
[NAME_MALE:great king:great kings]
[NAME_FEMALE:great queen:great queens]
[NUMBER:1]
[SPOUSE_MALE:great king consort:great kings consort]
[SPOUSE_FEMALE:great queen consort:great queens consort]
[SUCCESSION:BY_HEIR]
[RESPONSIBILITY:LAW_MAKING]
[RESPONSIBILITY:RECEIVE_DIPLOMATS]
[RESPONSIBILITY:MILITARY_GOALS]
[PRECEDENCE:1]
[SPECIAL_BURIAL]
[RULES_FROM_LOCATION]
[MENIAL_WORK_EXEMPTION]
[MENIAL_WORK_EXEMPTION_SPOUSE]
[SLEEP_PRETENSION]
[PUNISHMENT_EXEMPTION]
[FLASHES]
[BRAG_ON_KILL]
[CHAT_WORTHY]
[DO_NOT_CULL]
[KILL_QUEST]
[EXPORTED_IN_LEGENDS]
[DETERMINES_COIN_DESIGN]
[COLOR:5:0:1]
[ACCOUNT_EXEMPT]
[DUTY_BOUND]
[DEMAND_MAX:20]
[MANDATE_MAX:10]
[REQUIRED_BOXES:20]
[REQUIRED_CABINETS:10]
[REQUIRED_RACKS:10]
[REQUIRED_STANDS:10]
[REQUIRED_OFFICE:20000]
[REQUIRED_BEDROOM:20000]
[REQUIRED_DINING:20000]
[REQUIRED_TOMB:20000]

The only thing to note is that the [CIV:PLAINS] needs to match an existing entity (i.e. FOREST, MOUNTAIN, EVIL, etc... or whatever your custom entities are called). Everything else is, I hope, fairly self explanatory. The [LEVEL:0] changes are done at the start of the game and so take effect immediately. The next levels are reached through the LEVEL_METHOD, currently supported methods are YEARLY, SEASON, MONTHLY, WEEKLY, DAILY and the following number represents the percent chance for the effect to happen. Thus [LEVEL_METHOD:YEARLY:100] means that the entity will for sure level up at the start of every year. [LEVEL_METHOD:SEASON:10] means that the entity has a 10% chance to level up at the start of every season. The leveling method can be changed at each level up, but doesn't need to be.

Currently, NAME and LEVEL_NAME are just fluff and don't do anything.

All things that can be modified are shown in the example, with the standard raw system being the organization. (i.e. CREATURE:typegoeshere:creature:caste). Any questions, just ask!
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (now with a small help section for wrapper)
« Reply #353 on: October 21, 2014, 10:46:24 am »

So because I hate to not have a full to-do list, and absolutely hate being all caught up I thought of two new ideas that I am going to try and implement.

The first is a unit viewer with more in-depth information then is currently available. Since it will be with my own mod in mind, it will have a place to list all of the units classes, their current level/experience, experience to level, and amount of skill points available to spend. But it will also list information that users not using my class system will be interested in. Like current attributes (strength, agility, etc...), known interactions, active syndromes, and anything else I think of (maybe throw the health information in there too). For an example this is what I am thinking about;
Spoiler (click to show/hide)
So that every time you press shift-C or whatever button combination, when on a unit, you will get this screen in game.

The second is an expedition creator. What I mean by this is you will build a building, say you call it an Expedition Tent. At the Expedition Tent there will be several reactions available, Prepare Scouting Expedition, Prepare Raiding Expedition, Prepare Adventure Expedition, Prepare Siege Expedition, etc... When that reaction is run, a secondary screen will open up with several things listed.

On the left a size indicator will allow you to choose between Tiny, Small, Medium, Large, Huge (for the size of the expedition). This will determine how many units you can send. And the rewards (and possible costs) that the expedition will generate.

In the middle all current members of your fortress, and any available hunter/war trained animals will be listed. Each unit will have two scores listed, one for combat and one for scouting. The combat score will be calculated depending on their skills, attributes, current items worn, materials the items are made of, and anything else I can think of. Not sure what the formula will be for calculating the exact score, but it will be configurable if you disagree with my decisions. The scouting score will be calculated similarly, with different skills and items taking priority.

On the right a list of targets will be available, depending on the type of Expedition you started. If I can, I will use real in-game locations, like monster lairs and towns and so forth, otherwise the names and durations will be designated in a separate file, similar to my civilizations and classes system. Regardless you will need a separate file for all the other information required.

In this separate file you will list each type of expedition. Each expedition will have a difficulty score associated with it, that ties into the combat and scouting scores of your units, this will determine your chance of success. You will be able to specify requirements (like Small size only, or Huge size only, or 3 Hunting Animals required, etc...) as well as duration of the expedition. And you will be able to specify rewards for succeeding, penalties for failing, and any extra costs you think are appropriate.

Rewards can be material, skill/attribute, and/or knowledge based. There will be options for randomizing rewards, or giving specific rewards. Possibly even determining the rewards gained from raiding and sieging entities based on what that entity has access to. I will have to do more thinking on exactly how to handle the rewards.

Penalties will be things like injuries, skill/attribute loss, and anything else I can think of. Not exactly sure how I should handle these things, but know that it will be largely randomized and there will be different levels of failure, and even success may result in some penalties. For instance, if you siege an enemy, you might succeed and get all the rewards, but you might also take 4 or 5 penalties to your squad. Whereas you might siege a different enemy and fail, and suffer 15-20 penalties (numbers all place holders)

Extra costs are things like, coins, food, drinks, etc... Anything else you feel you need to do a proper expedition.

Once your size, units, and target are set, you will "send" the expedition on its way. All units selected will be removed from the map and unusable for the duration of the expedition. At the end of the duration the units will return to the edge of the map, and any item rewards gained will be placed at the expedition tent (for simplicity). And viola! You can now send your units on daring raids, perilous adventures, and deadly sieges.

tl;dr - Two new planned features:
1. Character viewing screen
2. In-Game Expedition Creator

As always, please post any thoughts/questions/feedback/rants etc... about these new planned features or any of the other planned/implemented features

Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack Spells (civilization scripts now uploaded)
« Reply #354 on: October 21, 2014, 02:32:02 pm »

You should probably also include sexual orientation and cultural identity (values based on, say, elves instead of dwarves; not sure if implemented yet past "MOUNTAIN citizens identify with MOUNTAIN", but it's there)

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (civilization scripts now uploaded)
« Reply #355 on: October 21, 2014, 03:47:31 pm »

I assume you are talking about for the unit display? Yes, that's a good idea.

When I get further along with it I will be posting for suggestions and requests that people would like to see on such a screen. So I will start a list now. My first step is learning DFHack gui stuff, which doesn't look to bad and has been on my list for a while now.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (civilization scripts now uploaded)
« Reply #356 on: October 23, 2014, 01:21:18 pm »

Gah, too many things to do! I keep jumping from one to the other and never end up finishing anything! Well I decided that I wanted to learn the gui, so I started with the unit viewer. The gui is still not quite working, but I do have a script that will list the name, race, caste, sex, attributes, active syndromes, known interactions, skills, and entity that the unit belongs to.

I underlined the interactions thing because, while it wasn't hard, it also wasn't immediately obvious/available, and it's something that I think is great to know. If I can get the gui to work I'll post some sample images, otherwise I would really like to go back and finish my "events" script. And I would like to make a sample civilization for the "civilization" script that mimics human advancement (e.g. Stone Age -> Copper Age -> Bronze Age -> Steel Age -> Industrial Age) so users can see the true power of the script (since I doubt anyone is using it right now)
Logged

palu

  • Bay Watcher
    • View Profile
Re: DFHack Spells (civilization scripts now uploaded)
« Reply #357 on: October 25, 2014, 12:44:17 pm »

Do you have some examples of how the spells should look?
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (civilization scripts now uploaded)
« Reply #358 on: October 25, 2014, 09:35:58 pm »

I do have several examples, but currently the interaction-trigger isn't working for me, so I don't want to post any examples until I know they work. When that happens I will post all the examples I have.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (civilization scripts now uploaded)
« Reply #359 on: October 26, 2014, 12:14:24 am »

I have taken a short break on the finishing of the "event" scripts to work on a gui. What I have come up with, so far. is a way to view a unit, it's attributes, skills, syndromes, interactions, and classes.
Spoiler (click to show/hide)
There is more I want to add to the view, but I am happy with the way it is progressing. I will be finishing up the "event" scripts this week.



On a side note, is there anyone that is using the class/civilization scripts, or any of my other scripts? Don't feel bad if you aren't, I am mostly making these for my own use, in my, what seems like never, to be released mod. Just wondering if they are at all useful for the community.
Logged
Pages: 1 ... 22 23 [24] 25 26 ... 42