Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 10 11 [12] 13 14 ... 24

Author Topic: Roses' Script, System, and Utilities Collection (07/06/2021)  (Read 91443 times)

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #165 on: November 26, 2016, 11:18:12 am »

I got a question about some of those targeting options, actually: what does the gt and lt in 'gtSkill' and 'ltSkill' and other stand for? greater/less than? If so, does it always compare to the unit running the interaction?

And if I may make a request, could you add an option to the class system for an attribute boost to only happen at a specific level instead of all levels? So, say, class A gets +5 strength at level 3 and only level 3.
« Last Edit: November 26, 2016, 11:21:08 am by Teneb »
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #166 on: November 27, 2016, 02:37:46 pm »

Yes, gt and lt do mean greater/less than. The format is -gtAttribute STRENGTH:2, this means that the targeted unit has to have a strength more than twice that of the source unit.

Do you mean the LEVELING_BONUS or the temporary BONUS? (Class posted below for reference)
Code: [Select]
[CLASS:WARRIOR]
 [NAME:warrior:warriors]
 [LEVELS:5]
 [EXP:50:100:175:275:400]
 [LEVELING_BONUS:PHYSICAL:STRENGTH:10]
 [LEVELING_BONUS:PHYSICAL:TOUGHNESS:10]
 [BONUS_PHYS:STRENGTH:25:50:75:100:150]
 [BONUS_PHYS:TOUGHNESS:25:50:75:100:150]
 [SPELL:RALLY:1]
  [SPELL_AUTO_LEARN]
 [SPELL:BATTLE_SHOUT:3]
  [SPELL_AUTO_LEARN]
 [SPELL:LEADERSHIP:5]
  [SPELL_AUTO_LEARN]
I will assume you mean the leveling bonus since the temporary bonus is already level dependent. Yes, I can make the leveling bonus function the same way the temporary bonus works. If there is just one number it will apply that increase at every level, if you wanted it to only increase at the odd levels you could do
Code: [Select]
[LEVELING_BONUS:PHYSICAL:STRENGTH:10:0:10:0:10]I'll put it on my list of changes to make.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #167 on: December 05, 2016, 12:59:23 pm »

Small update coming out today;

The flow/source script, which previously only allowed you to create a source or sink for water or magma, now allows you to create a source for flows as well. This will create a flow with a given density continuously (at a set interval) until the flow is removed using the same script. Like the water/magma source and sink it will persist over saving and reloading.

I'm almost done with the second half of the wrapper script (location and item targeting) and will be pushing that through soon as well.

EDIT: The wrapper script has been updated to include location and item checking. It will allow you pick nearby trees and plants as well as ground based on your inputs. It can also pick out corpses, any item, and projectiles. All that is left for it now is to polish the value function as it is currently fairly limited in what it can do.
« Last Edit: December 09, 2016, 06:08:47 pm by Roses »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #168 on: December 12, 2016, 01:54:52 pm »

I don't really know where to ask this so I figured I would just put the question here so as not to clutter up any other threads.

What information would you want to see in a bestiary? Say someone handed you there mod and you encountered a creature you didn't know anything about. If you could push one button to find out all the information, what would that information be? I am thinking the basics, average size, lifespan, any natural skills, interactions and attacks, extracts, maybe prefstrings?, biomes. What else?

Note that this is different than my unit viewer (which I posted a couple pages back), that will include all the information related to the individual unit (i.e. it's actual size, attributes, skills, etc...) This is more just a... well a bestiary. It will allow you to look up creatures by name and by biome so say you are an adventurer and you are heading into a particular biome and you want to know what to expect, or if you want to hunt a griffon and you need to know what biome they are in, stuff like that.

As a bonus modders will be able to include any pictures they want so that you can see a pretty graphical representation of the creature. If there is no picture available I plan on to hook up Japa's Dwarf Portrait to give a visual representation of the creature and it's various body parts and such.

EDIT: Also, how should seperate castes of the same creature be handled? For the standard Male/Female split it's not too hard but what if there are 6 or 7 different castes? How should that information be shown?

EDIT2: To give you an example of what it will look like


Obviously sizing needs to be worked on, but overall I think it works well
« Last Edit: December 27, 2016, 01:56:30 pm by Roses »
Logged

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #169 on: December 13, 2016, 12:43:11 pm »

Since you want this bestiary to be more for adventurers, you may also want to add the activity time of the creature (dawn, day, dusk, night, all). Maybe also if (and what) they eat, if they can see and so on.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Nahere

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #170 on: December 13, 2016, 02:55:04 pm »

Itemcorpses would be useful to know, given how many mods use them.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #171 on: December 15, 2016, 03:11:25 am »

Alright, now here's a question. When I am conveying information like NOPAIN and such, should I just use the DF token or should I put in some basic text describing that token, for example;

Code: [Select]
Traits:
                NOPAIN
vs.
Code: [Select]
Traits:
                Does not feel pain

EDIT: I suppose I could combine them, do something like
Code: [Select]
Traits:
                Does not feel pain [NOPAIN]
« Last Edit: December 15, 2016, 02:36:30 pm by Roses »
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #172 on: December 16, 2016, 01:58:35 am »

It looks like you're going to be having plenty of space on the bestiary screen, so just having both seems good.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #173 on: December 23, 2016, 11:36:14 pm »

Update to the bestiary script, I need to figure out how best to organize the information and display it still, but it's pretty much done.

Spoiler (click to show/hide)

EDIT: Ok, I added the ability to quickly make a compendium of basically anything in the game, including sorting and filtered searches. I just need to decide what information should be presented for each type of compendium. Currently I have;

Creatures - Pretty much everything shown in the above image plus the butcher results and any extra butcher objects or corpse item pieces
Plants - Biomes, seasons, growths, and plant products (drinks, mills, extracts, etc...)
Items - What it can be made of, any attacks it has, material size, armor stats (e.g. coverage), tool use
Inorganics (Metals, Gems, Stones) - Environment, material information (density, specific heat, boiling/melting point, etc...)

Is there anything else people would like to see added to the above lists, and are there any other lists that people would like to see? I was thinking about buildings and reactions lists, not particularly useful for vanilla but they could be very useful for modders. I am also going to make an interaction list, but I think that will be tied in with my spell system.
« Last Edit: December 27, 2016, 07:17:54 pm by Roses »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #174 on: January 21, 2017, 09:56:57 pm »

Been busy moving across country, but I have had a little time to work on some stuff. Here are some screen shots of the various compendiums. I am still trying to figure out the best way to display the information, and exactly what should be included. I do plan on having a way for you to provide descriptions for items, plants, and inorganics in the same way that there are creature descriptions. I'm also thinking about adding in what reactions things are used for. It's not shown in the below screenshots, but you can also look for specific types of items (like only show Weapons) and specific types of inorganics (only show Gems). I am interested in working on the biome information a little bit, currently, if you have a creature with [BIOME:ANY_LAND] it will show up as having 26 different biomes. It may just be easier to check for certain conditions and then replace the group of biomes with it's corresponding raws token. At the very least they should be grouped.

Spoiler: Bestiary (click to show/hide)
Spoiler: Herbiary (click to show/hide)
Spoiler: Inorganic Compendium (click to show/hide)
Spoiler: Item Compendium (click to show/hide)
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #175 on: February 02, 2017, 12:53:29 pm »

Please note, my script collection repository on GitHub is currently broken, the basic scripts should all work, but the systems likely will not.

Here is a copy of the butcher script that I posted in the DFHack thread
Code: [Select]
local utils=require 'utils'
local gui = require 'gui'
 
validArgs = --[[validArgs or]]utils.invert({
  'help',
  'unit',
  'corpse',
  'location',
  'kill',
 
})

local args = utils.processArgs({...}, validArgs)
if args.help then
  print('')
  return
end

corpse = nil
if args.unit and tonumber(args.unit) then
 unit = df.unit.find(tonumber(args.unit))
 if not unit then return end
 if unit.flags1.dead then
  for _,id in pairs(unit.corpse_parts) do
   item = df.item.find(id)
   if df.item_corpsest:is_instance(item) and not item.body.components.body_part_status[0].missing and item.corpse_flags.unbutchered then
    corpse = item
    break
   end
  end
 else
  if args.kill then
   print('-kill not currently working')
  else
   print('Unit is still alive and has not been ordered -kill')
  end
 end
elseif args.corpse and tonumber(args.corpse) then
 item = df.item.find(tonumber(args.corpse))
 if not item then return end
 if df.item_corpsest:is_instance(item) then
  if not item.body.components.body_part_status[0].missing and item.corpse_flags.unbutchered then
   corpse = item
  end
 end
elseif args.location then
 locx = tonumber(args.location[1])
 locy = tonumber(args.location[2])
 locz = tonumber(args.location[3])
 block = dfhack.maps.ensureTileBlock(locx,locy,locz)
 if block.occupancy[locx%16][locy%16].item then
  for _,id in pairs(block.items) do
   item = df.item.find(id)
   if df.item_corpsest:is_instance(item) then
    if item.pos.x == locx and item.pos.y == locy and item.pos.z == locz then
     if not item.body.components.body_part_status[0].missing and item.corpse_flags.unbutchered then
      corpse = item
      break
     end
    end
   end
  end
 end
end
if not corpse then return end

local view_x = df.global.window_x
local view_y = df.global.window_y
local view_z = df.global.window_z
local curViewscreen = dfhack.gui.getCurViewscreen()
local dwarfmodeScreen = df.viewscreen_dwarfmodest:new()
curViewscreen.child = dwarfmodeScreen
dwarfmodeScreen.parent = curViewscreen
local oldMode = df.global.ui.main.mode
df.global.ui.main.mode = df.ui_sidebar_mode.LookAround
local old_gametype = df.global.gametype
df.global.gametype = df.game_type.DWARF_ARENA

df.global.cursor.x = corpse.pos.x
df.global.cursor.y = corpse.pos.y
df.global.cursor.z = corpse.pos.z
for i,_ in pairs(df.global.ui_look_list.items) do
 df.global.ui_look_cursor = i
 if dfhack.gui.getCurFocus() == 'dwarfmode/LookAround/Item' then
  if corpse.id == dfhack.gui.getSelectedItem().id then
   break
  end
 end
end
gui.simulateInput(dfhack.gui.getCurViewscreen(), 'D_LOOK_ARENA_ADV_MODE')

df.global.gametype = old_gametype
curViewscreen.child = nil
dwarfmodeScreen:delete()
df.global.ui.main.mode = oldMode

df.global.window_x = view_x
df.global.window_y = view_y
df.global.window_z = view_z
Logged

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #176 on: February 02, 2017, 02:59:10 pm »

On the bestiary: I think a neat idea might be a list of what interactions a creature is capable of. Doesn't help much in vanilla, but sure does with mods.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #177 on: February 02, 2017, 08:00:20 pm »

On the bestiary: I think a neat idea might be a list of what interactions a creature is capable of. Doesn't help much in vanilla, but sure does with mods.

Yep, that is in there. The bestiary will only show interactions that are innate to the creature, but the unit viewer that is also coming will show all interactions, both innate and learned. The only thing I haven't been able to add that I want to is a list of what you get by butchering the creature. I know the exact amount of things will vary based on the creatures size. But it would be cool if you looked up Dragon, and saw that you would get Dragon Scales from butchering it. Note that extra butcher objects and corpse items are already included, I'm just talking about the vanilla stuff.
Logged

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #178 on: February 02, 2017, 10:10:57 pm »

Nice work, Roses!
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection (08/27/2016)
« Reply #179 on: February 09, 2017, 06:17:28 pm »

How unreadable is this?
Code: [Select]
[EQUATION:FIRE_DAMAGE_1:(50+10*SOURCE.ATTRIBUTE.PRIMARY/1000-5*TARGET.ATTRIBUTE.PRIMARY/1000)*(100-TARGET.RESISTANCE.!_TDDS+SOURCE.STAT.!_SKILL_PENETRATION)/100*(1+math.max(0,math.floor(math.min(1,EQUATION.MAGICAL_CRIT_CHANCE/math.random(100))))*(EQUATION.MAGICAL_CRIT_BONUS-100)/100)]
I'm experimenting with customizable equations. Basically if you don't like the way my scripts or systems do something, you can easily change it. Don't like how I compute hit chance for script attacks?
Code: [Select]
[EQUATION:PHYSICAL_HIT_CHANCE:STAT.HIT_CHANCE+STAT.!_HIT_CHANCE+5*SKILL.WEAPON]
You can change it! The only problem is some equations (like the first one) can be a bit difficult to read. (Don't worry about what the values actually are, that is all well documented)
Logged
Pages: 1 ... 10 11 [12] 13 14 ... 24