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 - Maklak

Pages: 1 ... 19 20 [21] 22 23 ... 94
301
DF Suggestions / Re: Reach attacks, not weapons.
« on: September 12, 2013, 10:19:23 am »
> The game doesn't allow it, because you are trying to build it on top of something, that doesn't make sense. That's my problem with it.
I'm trying to come up with an idea of how to add reach attacks on top of existing system, with minimal effort. AFAIK currently creatures don't have exact location, just [x, y, z] integer vectors, corresponding to tiles. Movement to a new tile takes a few ticks of time. For the purposes of getting hit, you are either in one tile or another, so anything finer grained than 1 tile, 2 tiles, many tiles distance, would require a lot of re-factoring of creature position and movement and maybe other things.

So while I proposed a simple system that's (in my mind) "close enough", I agree that things like having [lowest usable distance,optimal distance,highest usable distance] would be more realistic. It's just that there is always a trade-off between realism and other considerations.

@teloft
Nice catch. I don't play much adventure mode (well, I tried, but the FPS dropped to less than 1 after 2 hours, so I quit). I rather like the idea of a polearm sticking in front of the adventurer :)

302
DF Suggestions / Re: Reach attacks, not weapons.
« on: September 12, 2013, 04:57:26 am »
@WarRoot
After some consideration, I think my original idea should be modified to add attacks that can be used both close and reach, mainly for large beasts with natural weapons. This approximation is not perfect, nor should it be, but it is close enough. The required changes to the AI (trying to keep distance and attacking from distance) should be quite doable for Toady One.

303
DF Suggestions / Re: Reach attacks, not weapons.
« on: September 10, 2013, 02:22:01 am »
> You can't deal with this without inflating reach distance to ridiculous proportions.
Which is why I simplified the system to just close range and reach. It is an approximation, like the game tiles are an approximation of distance.

304
DF Suggestions / Re: Reach attacks, not weapons.
« on: September 09, 2013, 11:17:28 am »
> If an enemy is 1 meter from you, why can't you choose whether to stab or pole bash with your spear?

Well, something with 3m reach is hard to manoeuvre to hit something right next to you. You can't take a full swing with a halberd As for stabbing someone with a spear, you'd have to put most of the pole behind you, so it would be more practical to use the spear as a fighting stick or try to slash with the pointy end. Either way those aren't optimal uses of those weapons and there is no problem with weapons having multiple attacks in DF. 

305
Mod Releases / Re: Pony Mod: My Little Fortress
« on: August 29, 2013, 07:07:31 am »
Fine, Vadiku, I fixed it. I didn't even play your mod, so I know very little about it, but I've read a part of a manual for some much earlier version and it scared me away.

I also think this isn't a good place to discuss cupcakes.

I think something like this should be visible on the last page of this thread:



If anyone wants a pony mod, this version is playable, but outdated. It was made for the 31.25 (2010, pre-2012) version of Dwarf Fortress. Newer pony mods have a Cutie Mark (caste) system (with big learning rates bonuses), interactions and syndromes among other things.

A spiritual successor to this mod (albeit still buggy at the time of writing this) is here: http://www.bay12forums.com/smf/index.php?topic=117374.0

There is also a Fallout Equestria mod. It is quite awesome and stable, but it's maintainer quit. http://www.bay12forums.com/smf/index.php?topic=118893.0

Finally there is a mod by Vadiku's, which is the darkest of pony mods. http://www.bay12forums.com/smf/index.php?topic=121116.0

Take your pick.

306
Mod Releases / Re: Pony Mod: My Little Fortress
« on: August 25, 2013, 03:05:48 pm »
If anyone wants to play a pony mod, this thread and version is outdated. It was for a pre-2012 version of Dwarf Fortress (31.25).

A spiritual successor to this mod (albeit buggy) is here: http://www.bay12forums.com/smf/index.php?topic=117374.0

There is also a Fallout Equestria mod. It is quite awesome and stable, but unfinished and it's maintainer quit. http://www.bay12forums.com/smf/index.php?topic=118893.0

Finally there is Vadiku's Creepypasta (or "various derivative works of R-rated fiction" as he calls it)  Pony mod. http://www.bay12forums.com/smf/index.php?topic=121116.0

Take your pick.

307
DF Suggestions / Re: Communications in large scale army conflicts.
« on: August 19, 2013, 05:44:03 pm »
To me this is fine as it is in Fort mode, with messengers assumed to carry the orders behind the scenes. The battles themselves are chaotic and they should be, but a few more options from RPSes, such as "stand your ground" or "move as a group, minimum size x" would be nice.

If I recall a future of the fortress post correctly, the problem with communication was for adventure mode where some people see you and the info spreads to those who don't. Fort mode is fine with near omniscience (well, except I don't like the "has gone missing" part).

308
DF Modding / Re: [PRINT_MODE:SHADER]
« on: August 18, 2013, 12:17:47 pm »
Ah, maybe I wasn't clear. I know that renderer has little influence on FPS and that certain things can kill FPS. I just saw "fps+averaged times" in your TODO notes and it resonated with something I'd find useful. Play till an old fort runs out of FPS, then run it on a new computer and it's playable again, except there is no hard data on it, just an approximation from looking at fluctuating FPS. I didn't want to compare renderers or find ways to kill FPS, I wanted to compare which computer handles my forts better and by how much exactly.

Good luck with your project. Especially if you manage to take Baghun's place.

309
Here is an example for Regen mod: https://dl.dropboxusercontent.com/u/71287918/Scripts/regen.html

$ ../creatures.pl --html --misc --desc --all --compact --nobiome *.txt >../out.html

It lacks biome information, but otherwise prints everything that my creature script can print. At this moment not all the misc tags you listed are read and I think, I'll be adding BABY and CHILD to misc tags.

Hm, mysteriously some of my scripts work without the perl -w at the beginning and some don't, even though the first line in them is #!/usr/bin/perl -w and they are marked executable. Oh well.

310
> Listing all creature files.
Yeh, I'll include that in the manual... that I'm kinda writing now. Basically, the shell does this for you with globs. If you want all creature_ files, use *creature_*.* (don't put it in quotation marks or it won't work) and the shell will expand it into a list of files matching that pattern in the current directory (where * is any character string). You can test it with
$ ls *creature_*.*
$ dir *creature_*.*
Personally I just use *.txt which makes the scripts read all the RAW files (skimming most of them) and takes only a few seconds anyway.

Quote
Oh also another thing is there anyway to tell the output to have certain values? like NAME header column is "width=150px" and Descripton column is "Width=15%" and the rest can fight for the remainder of the HTML screen (I assume and from the looks your script outputs usable HTML tables)
Well, it just outputs minimal html code that works in Firefox, so the tables look OK, but for example the html header is just <content-type: text/html> and there isn't even a head or body, which works, but I don't think is standard compliant. Heck, the tables have no "title row", I just bold the column names and don't use even use <th> tags, just <tr>. The browser seems to make the width of columns sensible, especially on a wide screen, so I didn't fiddle with it.
To do what you ask, I'd have to add a lot of options for columns or maybe do something smart. Then try to support that for other output formats. My current take on it is that you can edit the html file manually and add things like column width, which is easier and faster for you (on an existing table) than for me (adding column width options to the scripts). I don't plan to polish these scripts to perfection, just make them produce reasonably usable tables, do all the tedious work and don't crash. Editing the tables before making them a part of some manual or something is a good idea. My time to work on this project is limited and I'd like to finish it sometime, so I'm willing to cut some features that might be useful.

If you have any working suggestions for what you want or even some working code, feel free to post it, but I reserve the right to not merge or support any patches. Just remember to play around with the options first, because maybe you'll get the tables to look OK without writing any code.

If you want to modify column names or add some width tags to them, search for "print $btb", the columns are named right below it.

> NAME (ID token would be background CREATURE:DOG), Description, Child, Baby, Intelligent/can_learn/Slow_learner, etc.
This is the actual information from modders that is relevant to me for deciding which parts of creature RAWs to read. RAW tags that you people want to see are especially useful.
Id, name, description are in.
Child / Baby - well, I guess with --verbose_size you can deduce that information from the Size column, because it will print when size changes, which I think marks transitions from baby to child to adult. Is that good enough? Or do you mean the number of children and multiple litter rare?
Intelligent/can_learn/Slow_learner - all of those and more (too many?) show up in the Misc tokens column.

311
DF Suggestions / Re: Reach attacks, not weapons.
« on: August 15, 2013, 01:39:47 am »
> Wait is this for the AI?
Yes, that was for how a military Dwarf should react, based on distance and what attacks he has.

What you've written just boils down to "target is within attack range, with at least one of my attacks" and all it does compared to my pseudo-code is not to step away from close range with a reach weapon equipped. The step-away was supposed to assume that reach attacks are better (due to assumed higher velocity multiplier of whatever) and try to position the Dwarf to use them when possible. Bonus points for the enemy not able to hit him with a shorter weapon.

I don't know what DF data structures look like and it would probably be best to make only minimal changes to them. We know equipping or loosing a weapon or being unable to use a natural weapon due to lost body part already works, so I took it for granted. 

312
DF Suggestions / Re: Reach attacks, not weapons.
« on: August 14, 2013, 02:19:23 pm »
I think one level of reach would be enough, at least for starters. Perhaps longer reach attacks could be added for mutli-tile creatures, but the grid DF uses is something like 2x2x3 meters, so 2 squares away is about the most that makes sense for polearms or claws on large beasts.

I didn't include a picture last time, but that code boils down to something like this. D-dwarf, a-attack, r-reach attack, . - ranged attack.
Code: [Select]
.........
..rrrrr..
..raaar..
..raDar..
..raaar..
..rrrrr..
.........
So the same tile and all adjacent tiles could be attacked with normal attacks, like they are now, but not reach attacks. Meanwhile r-tiles, exactly 2 tiles away in any direction, could be attacked by reach attacks only.

At least one non-reach attack per weapon should be mandatory with this system, just as it is now.

EDIT: For large beasts and such there could be an option to make an attack usable at both reach and close distance. Possibly with a difference in velocity multiplier.

313
DF Suggestions / Reach attacks, not weapons.
« on: August 13, 2013, 05:34:20 pm »
I think in one of Future of The fortress talks Toady One mentioned reach weapons (such as spears) and that he isn't sure what to do about them. Or something like that.

I think, I figured out a sane way to make it work. Don't make reach weapons, make reach attacks instead. That way a halberd or spear could have it's most effective attack(s) have reach, but also have an attack (pole bash?) for close combat. So [ATTACK:...] token would get one optional extra component REACH. It could also be applied to some creatures natural attacks, such as dragon tail swipe or whatever.

In combat, it could work like this. (dx, dy - distance to the enemy in tiles)

Code: [Select]
if ((abs(dx) == 2 && abs(dy) <= 2) || (abs(dx) <= 2 && abs(dy) == 2))
{ // REACH attack range.
  if (weapon has reach attack)
  { // use reach attack
  } else if (ranged weapon)
  { // fire if ammo, else step towards the target
  } else
  { // step towards the target
  }
} else if (abs(dx) <= 1 && abs (dy) <= 1)
{ // Normal weapon range. If weapon has a reach attack, consider stepping away from the target
  // instead of attacking (assume reach attacks are better on weapons that have them).
  // Or just use one of the non-reach attacks, especially when the enemy is faster. Or maybe see if
  // another enemy is in REACH range and attack that one instead.
} else
{ // Out of range. Fire ranged weapon if ammo, else step towards the target.
}

As to which attack is used, normal rules could apply, but with an added twist that reach and close attacks are never applicable at the same time.

What do you think?

314
DF Modding / Re: [PRINT_MODE:SHADER]
« on: August 13, 2013, 11:34:02 am »
I just dropped by to see how this is going, since SDL2 came out.

TODO list: Wow, looks complicated.
> show fps+averaged times on an overlay. maybe do a graph ala eve online
Well, it would be somewhat useful to have a "DwarfMark" - a Dwarf Fortress save that has 200+ Dwarves, lots of items and some liquid flows, then unpause it on different computers, look at average uncapped FPS over a minute and have a benchmark for which one seems to be the fastest.

BTW, this thread should be moved to Modding/Tilesets and Graphics. It may get more visibility that way.

315
> Do your scripts go through every file? or does it only search files that have a certain target in them?

I guess, I'll have to write a manual someday, including the basics of using a shell.

My scripts read every file you tell them to and the shell conveniently expands globs for you, so for example *.txt will be expanded to a list of text files in current directory (which inside raw/objects happen to be DF RAWs). If you want to only read the files with *Item_Weapon*.* then just use the glob I've just written, but add --nocivs because there will be no entity and reaction data if you only read weapons and you'll get an empty column otherwise. You can test globs using ls.
$ ls *Item_Weapon*.*
$ ls *.txt
The scripts saying things like "read 0 items" is a dead give-away they didn't get the right files to process.

My scripts generally work like this:
0) Look through @ARGV, the list of command line parameters and recognize script options. Set global variables (so if some options are mutually exclusive, only the last one is used, with no warning).
1) Treat the rest of script parameters as a list of files. It doesn't care about filenames. Nor should it. The options always must come before filenames. (This is a necessary convention, because some idiot might begin a file name with a minus sign and the admin must be able to  $ rm -f -- -stupid_file_name).
2) Read everything in specified files and look for [<token>], matching every token to a series of regexps. Note that this is context-sensitive and things like reactions, weapons and so on should be in separate files. This is because while reading something complex, I didn't bother to list all permitted tokens and just skip those I'm not interested in. That is, I have a master-function for looking for what to read (weapons, ammo, entities, reactions) and helper functions for reading specific data, but those functions generally just skip unknown tokens and only return on end of file or next item of similar type.
3) While reading token after token, the global data for things like weapons are constructed. Those usually consist of arrays of hashes. For example there is an array of weapons, where each entry has keys like "ID" or "NAME" or "MIN_SIZE".
4) Once all the files are processed, print the tables in specified format to standard output.
5) Discard all read data and end.

Pages: 1 ... 19 20 [21] 22 23 ... 94