Bay 12 Games Forum

Please login or register.

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

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

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Roses' Script, System, and Utilities Collection v0.1 (10/27/2015)
« Reply #75 on: February 12, 2016, 07:38:17 am »

So I finally decided to dust off the random creature creation script that I had created before. I have added a GUI and many other features. See the GUI below, and read how the script works. It is almost ready for release, with just a few more options that need to be moved from the black box of the code into easily configurable options. Let me know what you think!
Roses: the middleware that you are building with the Civilization, Class, Spells and Event Systems have in my opinion the touch of genius.
Spoiler (click to show/hide)
Why I think so:
- Dwarf Fortress (DF) raws are a declarative language where the modder describe what he intend to be done by the simulation, but where all the complexity of the HOW is somewhat hidden from him.
- DFHACK has tried from its inception to expand the universe of things (mechanisms) that can be expressed with DF raws, to this end the DF team have tried many different approaches to be able of communicating to the simulation that more functionalities were required within the limits actually implemented.
- Then an army of admiring DF followers have taken all the disparate weapons disponibles to them (Lisp, Perl, C++, c# ,Go , java, AutoHotKey ,Python, Ruby, Lua, ...) to fight their way to this noble end: Expand the unique content in DF.
- Like a modern Tower of Babel these army of peasants, without discipline, with humble equipment, abilities and skills, even if barely able of communicate and understand each other, all of them can feel that their hearts are broken by the love to this game, all those hearts singing the same love song!!!
- Like warriors and poets of old time, against impossible odds they battle, each time they lose, but their will is like stone and strong are their hearts, their faith will never abandon them.

What you have done with these four files: civilizations.txt, classes.txt, spell.txt and events.txt is not new, I know, you could do the same before with moddtools and some other scripts.
So where is the genius? For me it is in using exactly the same format of DF raws to expand what can be declared and autolimiting yourself to the tiny 146 Kb of lua.dll;  you have removed the principal limitation of the workers in the Babel Tower, they all can now communicate and expand new original content in the most basic language of the DF universe, the DF raw language!

In order of being absolutely mimetic with native DF raws, at the beginning of each one of those 4 files it could be added
Spoiler (click to show/hide)
And then even enable to separate each one of these 4 new expanded categories in different files like the native DF raws do as a way of encapsulating contents.

The innovation is using  or mimicking what is there from the very beginning (DF declarative Lang-like) to do new and wonderful things, could your hard and masterful work, into these new mechanisms and abstractions to approach the hard earned results of the dwarven SCIENCE to the basic modder, inspire others to give birth to a new era in this community.

We all thanks your silent hard work and dedication! We are so lucky to have so much people like you in our community...

Putnam has already started playtesting your middleware in his forbent mod, he is maybe the first pioneer but soon there will be others striking the uncharted earth of the frontiers of DF modding
« Last Edit: February 12, 2016, 11:51:02 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.1 (10/27/2015)
« Reply #76 on: February 12, 2016, 07:44:16 pm »

the funny part is that i've thought about moving the whole fortbent class system to one of my own design just so that I don't have to rely on any dependencies, since I'm fully capable of that; main thing stopping is that it mostly work at this point (though it has errors every single time anything dies) and there's just a ridiculously huge amount of classes I made, which may be why the game hitches for something like 300-700 milliseconds for every class that I assign.

Like, tbh, I'm by far the worst example of the greatness of the raws system, I basically just ignore it entirely this point except for the very most basic of things. I made an entire mouse UI in the new SCP mod before even considering whether I could've done it with reactions (I can now, since descriptions and categories were added, but at the time it was infeasible), for example.

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.1 (10/27/2015)
« Reply #77 on: February 12, 2016, 09:42:35 pm »

-snip-
Thank you for the kind words. I had originally thought of making the systems in a more intuitive language, but since they are explicitly for DF I decided to go with the raw templates. Currently you can actually have as many class/civilization/events files as you want. It looks for all files labeled classes_*.txt etc... And reads them in. You are right that if I wanted to make it more like the raws I should put an [OBJECT:] header and such, but I always found that that is the most unfriendly part of the raws.

the funny part is that i've thought about moving the whole fortbent class system to one of my own design just so that I don't have to rely on any dependencies, since I'm fully capable of that; main thing stopping is that it mostly work at this point (though it has errors every single time anything dies) and there's just a ridiculously huge amount of classes I made, which may be why the game hitches for something like 300-700 milliseconds for every class that I assign.

Like, tbh, I'm by far the worst example of the greatness of the raws system, I basically just ignore it entirely this point except for the very most basic of things. I made an entire mouse UI in the new SCP mod before even considering whether I could've done it with reactions (I can now, since descriptions and categories were added, but at the time it was infeasible), for example.

What errors are you getting when something dies? I think I might already know the error. Death tracking is used in all the systems, but if you are just using the class system it will probably give errors. It was set up this way because I thought you could only have one onUnitDeath event declared and everything had to go in there. I have since learned that that is not the case and the new version will have it separated so that if you are only using one system you shouldn't get any errors.

I have also sped up the system dramatically by no longer filling in the entire table for a unit when a class is assigned. The current released version will make a table for each attribute, skill, trait, class, and all combinations there of. The new version will only populate those tables when they are needed. This dramatically cuts down on space and time usage since you are rarely going to be using all of the attributes and skills and traits for each class. There are also some extra speed up additions that are just from making the code more efficient which should help the slowdown. Basically I split the class system into basic and advanced, for the end user there is no difference, but all the advanced features that take up space and time to run don't need to be active if you aren't using them, so they only become active the first time they are called.


Finally, I have fixed the #NAME problems I was having with my random creature creation script. You are now able to specify as many adjectives, prefixes, suffixes, and main words as you would like in each template. The script then picks between 0 and 2 adjectives, between 0 and 1 prefixes, between 1 and 2 main words, and between 0 and 1 suffixes. It then assembles them all into a name. One of the more earth like names I have gotten was Large Arctic Terratox Centipede (a 100 legged creature that lives in arctic biomes underground and toxic). Unfortunately some names are silly like Fire Sightless Ambibeast, and others are just ridiculous, Chitinous Soft Bug. But that's what you get when you randomly assemble words I guess.
Logged

Abadrausar

  • Bay Watcher
  • empowering ideas
    • View Profile
    • ♫♪♀HDFPS♂♪♫
Re: Roses' Script, System, and Utilities Collection v0.1 (10/27/2015)
« Reply #78 on: February 13, 2016, 08:34:57 am »

the funny part is that i've thought about moving the whole fortbent class system to one of my own design just so that I don't have to rely on any dependencies, since I'm fully capable of that; main thing stopping is that it mostly work at this point (though it has errors every single time anything dies) and there's just a ridiculously huge amount of classes I made, which may be why the game hitches for something like 300-700 milliseconds for every class that I assign.
Putnam you are one of the most capable Lua modders in our community next to Roses, IndigoFenix, Expwnent, Lethosor, Warmists,Milo Christiansen, Quietust or many others.
As a group you are like the spearhead of the community and we all gain when some of you find the ways to collaborate; (git or other SCM) as individuals all of you are able of impressive feats that are however dwarfed by the things that you have done as a group. Ideas and breakthroughs lands randomly and inter pollinate.
... I had originally thought of making the systems in a more intuitive language, but since they are explicitly for DF I decided to go with the raw templates...
That almost every DF modder out there is able to use in some way, using the familiar "lingua franca" of DF raws to give access to the new functionalities and systems (civilizations, classes, spells, events, ...) you have democratized and uniformized the access to everybody. You are removing the entry barriers.
...Currently you can actually have as many class/civilization/events files as you want. It looks for all files labeled classes_*.txt etc... And reads them in....
Nice. :) Docs are in need of some love then?
...You are right that if I wanted to make it more like the raws I should put an [OBJECT:] header and such, but I always found that that is the most unfriendly part of the raws...
Sure! Your system does not need that, you could even ignore [OBJECT:] things as decorators. But adding them is a way to evite confusion and make your DF raw extensions indistinguishable from those of vanilla. Because the casual modder does not need to know that some raw files needs [OBJECT:] and others no... ;D Best to relieve people of the burden of something that only can be at the origine of problems.


« Last Edit: February 13, 2016, 09:37:40 am by Abadrausar »
Logged
::: Humble Dwarf Fortress Publishing System ♫♪♀HDFPS♂♪♫ Mods Push Published in DFFD are auto updated in local Players Catalog :::

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #79 on: February 16, 2016, 01:54:33 pm »

Updated first post, and included the Random Creature Creation Gui in my github collection. Let me know if you try it out! And please post any and all templates you wish to share.

Also added classes_example.txt and spells_example.txt for an example of what you can do with the Class System. Next up will be examples for the Event and Civilization Systems.
« Last Edit: February 16, 2016, 09:17:14 pm by Roses »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #80 on: February 24, 2016, 09:35:35 pm »

Alright, so, because one of my future ideas requires simulating combat, I think it's about time to come up with a reasonable "to hit" calculator. But in order to do this I would like some feedback from anyone that is interested in contributing. To start off we should be able to answer these questions;

  • What is the hit chance for two creatures with the same agility, both of which have zero skills?
  • How does increasing in a particular weapons skill increase the likelihood of hitting with that weapon?
  • How does increasing in the dodging (or armor/shield user, or any other skills) decrease the likelihood of being hit?
  • How does agility increase/decrease the likelihood of hitting/being hit?
  • An attack's velocity is calculable (thanks to Urist DaVinci), should we compare attack velocity with gait velocity in some way?

Now obviously the ideal would be to get the actual in game hit chance calculations, but I am not well experienced with looking at disassembles of code (such as done here for velocity and other attack components). If anyone else with experience would like to try to find out, or if anyone knows a way to find out how worldgen battles are calculated that would be amazing.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #81 on: February 24, 2016, 11:52:01 pm »

The only thing I know about worldgen battles is that they work by choosing a "champion" from each side, then the champions fight until one dies then the losing side picks a new champion. That's why worldgen non-vampire histfigs sometimes get hundreds of kills.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #82 on: February 25, 2016, 01:56:33 pm »

Interesting. Not the best way to handle group combat, but not terrible either. The question is, how is the champions fight handled? Is it fully realized, like with arena combat, or is it just a string of equations which is deterministic? I suppose I could ask Toady directly. See if he would give me any insight into his hitchance calculations.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #83 on: February 25, 2016, 03:29:56 pm »

It's not arena level but not perfectly deterministic AFAIK. Dice rolls have been mentioned in relation to that; probably uses the history seed for all that.

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #84 on: February 26, 2016, 05:23:32 pm »

I did a small amount of research into attacks. Posted my results here. I think the next step is to create a script that outputs large amounts of data at every time step and copies it into a single file, this should speed up the process and give me better statistics instead of just individually going through the attack values.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #85 on: March 07, 2016, 07:00:35 pm »

So I dusted off my detailed unit viewer gui that I had been working on before, with the reasoning that there needs to be an in-game way to see Class information if you are using my Class System, it also allows you to see active syndromes on units, basic health information, skill information, and anything you would see in the normal description screen. There are sub-pages that will give you even more information, including exact syndrome details, exact attribute numbers, and more.

Spoiler (click to show/hide)
Spoiler (click to show/hide)
Spoiler (click to show/hide)

Note that I am not done with putting all of the class information in there, but you can scroll through different classes, it will tell you if you are eligible for that class, and then will allow you to change to that class (if allowed by the modder, since I know some modders might like to limit certain class changes to reactions of some sort).

Note2, the layout is easily configurable. and can store more information than is currently shown. But for now this is what I have.

Thoughts?
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #86 on: March 08, 2016, 02:55:39 am »

Wow, that looks awesome!
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #87 on: March 08, 2016, 05:09:14 pm »

Holy crap that just makes the default presentation look even more painful.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #88 on: March 09, 2016, 04:32:30 am »

What happens when the Thoughts and Feelings (or any other) category starts to stretch past the end of the page? Does it get truncated or does it scroll?
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

expwnent

  • Bay Watcher
    • View Profile
Re: Roses' Script, System, and Utilities Collection v0.2 (2/16/2016)
« Reply #89 on: March 09, 2016, 04:58:33 am »

PSA: the most recent (beta) DFHack release, DFHack 0.42.06-alpha1, has a crash bug that will affect many of these scripts. Anything that uses persistent data will likely make the game crash when commissioning something related to a historical figure. Running this script before doing that should fix the problem temporarily:

Code: [Select]
--fix-histfigs.lua
local figs = df.global.world.history.figures

for i=0,#figs-1,1 do
   local v = figs[i]
   if v.id<0 then
      --print(v.id..' '..v.name.first_name..' '..v.name.language)
      v.name.language = 0
   end
end
Logged
Pages: 1 ... 4 5 [6] 7 8 ... 24