Help making combat items map

zarqon

Well-known member
It's probably been about a year since I first started planning my combat consult script, the last in my consult script trilogy, the omega, the 3 of 3, the denouement.

I'm starting to get sick of it being on my to-do list, so I'm requesting your help with one of the many tasks involved, freeing me to work on some of the others. I need a few maps (4, actually) to provide information about combat options.

Combat Items

The first is a map of combat items with the following structure:

PHP:
record combat_rec {
   string dmg;      // damage formula
   string dmgtype;  // types of damage done
   string special;   // comma-delimited list of other combat results, multi-use
};
combat_rec[item] throwables;

The dmg formula will use ZLib's eval() function (which uses mafia's modifier_eval() function) to arrive at a result. The result should be the average amount of damage done by throwing this item.

The dmgtype variable contains a comma-delimited list of elements, i.e. "hot,cold,physical". Spaces don't matter. The script will assume an even distribution of damage among those types -- if it's otherwise, let me know.

The special field is described in more detail several posts below. It should contain additional combat results from using the item: delevel, stun, hp, mp, and meat. In addition, only for combat items, this field will contain the text "multi" if the item is guaranteed to not be consumed on use.

Combat Skills

The second map is for combat skills and has this structure:

PHP:
combat_rec[skill] castables;

All of these fields are identical to the fields used for combat items above.

Combat Gear

The third map is for gear which may have an effect in combat that is not already included in mafia's numeric modifiers:

PHP:
combat_rec[item] wearables;

Fields here are identical to the above, but there will be handling for a special flag "retal" in the special field -- including "retal" (short for "retaliation") in the special field means that the specified damage/other results will only occur when the monster successfully hits you.

Combat Effects

The fourth map is for effects which may have an effect in combat that is not already included in mafia's numeric modifiers:

PHP:
combat_rec[effect] intrinsics;

Fields here are identical to the fields for gear, including the use of "retal".

How to Help

Some people have decided to put the maps-in-progress on Google Spreadsheets, where they can be edited concurrently without the risk of overwriting another person's changes. So until it gets finished, here's where to go to edit it. Note at the bottom that there are multiple sheets!

If you have any questions about what to do for any special cases that may arise, feel free to ask them here.

Thanks oodles to all helpers! If we complete these, they would certainly be useful for other consult CCS's as well, not just mine.
 
Last edited:

camperdave

New member
Hey zarqon, I've started tossing a few more items from the wiki into this format. However, I have a question about the extensibility of this format - what about the handful of combat items that delevel, as well as do damage. That seems like an important piece of information in terms of calculating the optimal attack, but currently, there's no space for it in the record.

However, it's your script :)

PS: What about items with "weird" effects, like the spectre scepter?
 

zarqon

Well-known member
Ok, I wrote a nice detailed response in the box and then installed Flash Player 10 before posting it. Durrrr. So now, apologies in advance but I'm going to write a shorter response below.

Summary of my previous post: Great feedback. Don't like taking up an entire field for something that only affects a very few items -- feels organized but inefficient. Originally map was strictly for damage, script would handle other results.

BUT. I have grown to like the idea of a "special" field which contains a comma-delimited list of all non-damage results of using the item. For instance, "delevel 0.5, hp 1.5, stun 0.25" for the spectre scepter. Love songs would also have something in this field.

So I'll go ahead and say that we can add another field to the map -- it's as good a place as any.

Results which can be added:

delevel
stun
hp
mp
meat

These should be expressed as modifier_eval() formulas (floats), and represent the average for any given round. I added the spectre scepter and the mp/hp-granting love songs to the file so you can see how to do it.

Important: delimit the list with a comma and a space. modifier_eval() formulas, on the other hand, must not include spaces. Further, note that these values (except stun) could possibly be either positive or negative.
 
Last edited:

Tarko

Member
As a thanks to all you've done for us, the community, I'll be spending a bit of time on this today.

I don't quite fully understand the 'special' field, so I'll mark it down when it's incomplete.

I'll add every combat item from: http://kol.coldfront.net/thekolwiki/index.php/Category:Combat_Items

and arrange them alphatecly(?) wether or not I input the stats for them or not.

it will at least gives a neat base to work with.
 
Last edited:

camperdave

New member
Another little question: decimals. I'm probably asking a dumb question, since I'm not super familiar with mafia's eval(), but should the averages be rounded to integers, or have a decimal. It seemed from the dmg values that you filled in, those should be integers (when X.5 would have been a "better" average occasionally), but now you've put some decimals into the special field - so, when, if ever should I (and others) use decimals?

Also, I'd just like to say, this seems like it's going to be really useful already!
 

zarqon

Well-known member
@Tarko: Thanks! Don't worry too much about alphabetizing, since when this is updated via load_current_map() it will be automatically alphabetized.

Let me explain combat results which can be added in the special field. There are five additional combat results besides damage which affect combat decisions:

delevel A, stun B, hp C, mp D, meat E

  • A is the average deleveling you get from using the item. If an item delevels the monster by 1-3 levels, you would include "delevel 2" in the special field.
  • B is the average number of rounds the monster is stunned (usually 1 for stunning items). If something has a 25% chance of stunning a monster for one round, that means the number would be 0.25.
  • C is the average amount of HP you get from using this item.
  • D is the average amount of MP you get from using this item.
  • E is the average amount of meat you get from using this item. For the toy mercenary, that would be a negative value. Do not include the cost of the item here -- that will already be considered by the script.

All of these should be expressed as modifier_eval() formulas. In most cases they will just be a single number but in some cases they may be formulas (you can see I added in formulas for the love songs already).

Only include results that exist -- including "stun 0" is unnecessary. Separate them with commas and spaces, as I did for the spectre scepter.

I hope that clears up the "special" field. I will also use the same mechanic for skills -- and, probably, your equipped gear.

@camperdave: Use floats (decimals) where they are more accurate. I originally used ints but have decided floats are better.

@Tarko again: In practice, it doesn't really matter a whole lot. If the item has a 25% chance of doing a hot attack of 10-12 damage, and a 25% chance of doing a physical attack of 6-8 damage, this means it has a 50% chance of doing either 7 physical or 11 hot damage. So you would put 4.5 (50% times the average damage) for damage, and "physical, hot" for dmgtype. The script will assume this damage is half physical and half hot (2.25 of each), which is not very different from 25% of 11 (2.75) or 25% of 7 (1.75). It only becomes an issue when dealing with elemental monsters.

This is what I'm sticking with for now. I may change it later.
 

Tarko

Member
I just finished 'P'.

I call it a day, will continue tomorrow if no ones picks it up.

I will upload what I did for today.

I am giving you a lot more info you requested, up to you to delete what you don't want.

I didn't go over what was already there except for 3 of them with blatant error. Maybe I'll have to go back later on and edit back the others...

(Ex: Miniborg Destroy was only hot with lower DMG output. The mossy Sphere was stated as combat item and there was a stunning effect missing from another one.)

From what I've seen, things you might want to add to the 'special' field:

Ongoing : When an item does DMG over many rounds.
Delay: When it takes many (usually 3) rounds for the DMG to take effect
Skill: For when an Item gives a skill-like effect
RunAway: 0 for Free ones or whatnot?
VS: Special effect VS special monster or monster type
Restorable: Boolean, if the item is a restorer or not
Location: Some items work better UnderWater

Those are simili-constant there is obviously other weird behavior (EX: blue shell)

Cheers,

I'm off for the day.
 

zarqon

Well-known member
Tarko: excellent! Thanks a lot!

Responses to your well-considered "things to additionally add":

Ongoing: for now, leave it out. That would have to be a special case in the code.
Delay: if it won't do damage this round, consider the damage 0. I'm pretty sure the first version of this script will ignore items that have delay. (What are they by the way?)
Skill: like what? This sounds like another thing to ignore for the time being.
Runaway: this will be a separate part of the script.
VS: FTF does most of the special-item handling. What are some other examples you came across?
Restore: That's what the "hp" and "mp" categories are for, which I've noticed you've been adding in just fine.
Location: look at SmartStasis (in particular, the formula for the sea-sensitive starfish-types) to see how this can be part of the formula rather than a separate field. Better, look at the original documentation for the modifier_eval() function.
 

camperdave

New member
Oops :p Seems a few of mine got wiped out. Luckily, it wasn't THAT much, and the alphabetizing is pretty cool so we know where we are on the list. I'll start my way up from the bottom, so just remember to take a look at the version uploaded :p

EDIT: Up to T (from Z) so far, had to leave a couple semi-unfilled due to complexity, perhaps someone could take a second look through as well?
 
Last edited:

Rinn

Developer
This is actually something that would be good to work on in a shared Google Document spreadsheet since those allow concurrent editing and spreadsheets can be easily pasted into a text document as tab delimited.
 

camperdave

New member
That's a really good idea Rinn....

http://spreadsheets.google.com/ccc?key=0Al2IaYI_g2_RdDRtYTlHVDJ6RDB4c191azZ3RWpWNkE&hl=en

I know I'll be doing my edits here :p

EDIT: Cleaned it up a bit. Took the liberty of adding a seperate column for what seems to be the unofficial trend of !!!!!! notes, rather than having them clog up the misc. section. Hopefully, we'll resolve all of them anyway, and, that won't mess up the text file when flattened from a spreadsheet.
 
Last edited:
Hi Zarqon,

I was just wondering, are you planning to produce a general-purpose combat script that can optimally fight each battle? Something along the lines of the FightOptimizer script, but more comprehensive and with more options? That script does a pretty good job of using optimal skills, but doesn't use items, or cover the things that SmartStasis does.
 

Tarko

Member
Sorry Dave if I over-written some of your writting. When I uploaded I made sure it was the same file, I guess I didn't see the changes or my sight is just crap. I guess you weren't an happy camper (Yes, you can slug me for the bad pun).


@Zarquon (French spelling btw)

Ongoing : How do you want to write down the Dmg? First round of DMG only and disreguard the following rounds? (As I've been written them so far).

Delay: Hum.. Face-hugging Alien is a Delay3, it takes 3 turns before it acts. The initial dmg is usually 0 but then, 3 round later 3000! Want to write it down as 0 or as the Avg of DMG/round? (Ie: 1000)

Skill: So far the skill-like effects I came across: Pickpocket and the Grin skill that modify the monster list in an area. It is a safe bet to think other items will emulate skills in the future. But I do agreee there's not a lot of them so far

RunAway: Some items provide Runaways. Sometimes free, sometimes not. I guess you can keep track of a 'runaway items' in your consult script if need be. Just pointing it out as there's a few of them.

VS: Out of the top of my head: communication windchime, Hand-Phone, all the Mer-kin items and another one that deals extra dmg vs Hyppies.

Location: I have to admit I didn't understand a single thing from the link you send. As long you understand someitems react differently underwater/above_water; it's cool with me. Up to you to deal with it :p




I need to express that even if you were looking for the DMG throwable items that I feel that this effort of doing the map can/will serve a greater purpose; hence why I try to put as much info as I can and why I list every single items in the list.


Keep-on the good work all, especialy those who know what they are doing ;)




EDIT:


Just Finished the 'R's and 'S's !

We have a complete file on the Google Docs.

Need to tweak-out a bit , edit and proof-read I guess, but the bulk of it is done.

Thanks to everyone who spent time on this.

/EDIT
 
Last edited:

zarqon

Well-known member
Ok, I've updated the first post to point to Google Spreadsheets rather than the Map Manager. Good idea.

A note about bang potions: don't write the name as "dark potion" etc. but rather "potion of detection" etc. You don't necessarily know what a swirly potion does, but you do know what a potion of inebriety does. Bang potions with non-combat-influencing results don't need to be included.

Ongoing: just the first round of damage, but make a !!!!!!!note. I'll deal with this once the algorithm gets honed a bit more.

Delay: it sounds like there aren't many items with delay. If there are fewer than 5 of these items, omit them from the map entirely (but report them here). Otherwise include them with full post-delay damage and a special field "delay X" | X=rounds

Skill: The examples you gave are things better dealt with in FTF (and some of them are already in it). So leave them out of the map.

Runaway: this map is not concerned with this. If the item guarantees a runaway, omit it from the map.

VS: for now, gloss over this however you like, but make a !!!!note.

Location: eval() formulas have a few built-in functions like loc() and zone() which return 1 or 0, depending. If an item does 5 damage, plus 10 bonus damage underwater, we could do 5+10*zone(sea). Dictionaries should multiply their damage by loc(chasm).

Thanks again everyone, this is exciting.
 

camperdave

New member
How about the handful of items that give an Effect, or cost an item to use?
(IE, I know one of the oyster eggs boosts one stat at random via an effect, and the you soldier costs a bottle of tequilla to use)
 

zarqon

Well-known member
Ok, I went in and cleaned a few things up to reduce/direct the remaining work:

1) deleted items which only affect runaways
2) deleted bang potions, since they need adding under different names i.e. "potion of confusion"
3) deleted spheres, since they need exactly the same renaming i.e. "sphere of fire"
4) deleted items handled by FTF
5) fixed a few formulas (note: formulas CANNOT HAVE SPACES!)

I didn't have time to get rid of the asterisks ahead of some of the item names or convert capitalized items to canonical case.

It's looking awesome, thanks everyone!
 

zarqon

Well-known member
You guys have done such an awesome job with this that I expanded the project! I added an additional sheet for combat skills, seeded with what I had so far. (You can see that I was originally simply writing this as a script to fight physically-resistant monsters -- I have all the combat spells that deal elemental damage, but basically none of the others.)

See the updated first post for details about format. Warning: It's basically exactly the same as the items map!

Please include all combat skills that directly affect dmg/hp/mp/meat/stun/delevel -- even those granted by items or effects.
 

Tarko

Member
Sorry, RL happened.

I'll be back on this on Monday with PLENTY of time.


Edit:
Just added the DoD potions to the item list.
Looking at the Skill sheet and I must say I feel overwhelmed, but will try my best anyway if something is missing; or I might just input the names in so we know where we are. I found this, and I wept: http://kol.coldfront.net/thekolwiki/index.php/Skills_By_MP_Cost

I was wondering: how do you intend to keep track of the Max_Modifier for the spells? And how do you intend to keep track of the splash-back effect on Sauceror spells?
 
Last edited:

zarqon

Well-known member
I've added two more sheets now -- one for gear and one for effects. There are some of those that cause passive damage / stun, etc, which I would not be able to discern from mafia's numeric modifiers. I'm using a single record type for all of them now too. See the first post for updated info.

Tarko: All the skills are already there, I copied that list in from the Wiki's Combat Skills page, so it should already be comprehensive. I also removed all the skills that I didn't want the first version to deal with, and skills FTF handles (like Olfaction).

It does still need the TT combos to be added in, though, since those are considered separate skills.

I'm not sure what you mean by Max_Modifier.
 
Top