Difference between pages "Proxy Records" and "Help:To Do List"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>Bale
 
imported>Bale
(10946: Add the "swim" CLI command.)
 
Line 1: Line 1:
Proxy Records is a way for KoLmafia to pass additional information to the scripter. Many datatypes contain these proxy records. such as items, skills, effects and coinmasters. This information is referred to as proxy records because the manner of reference is similar to a field of a [[Data_Structures#Records|record]].
+
{{TOCright}}
  
 +
== "To Do" List ==
  
{{CodeSample|
+
This is a list of stuff that is missing from the wiki or else needs major work. Please help!
description=This is an example of how to retrieve proxy record information in a script. Notice it uses the same notation as if the item datatype is a record.|
 
code=<syntaxhighlight>
 
item it = $item[coffee pixie stick];
 
print("You can buy a "+ it +" at the "+ it.seller);
 
print(it +" will cost "+ it.spleen +" and give "+ it.adventures +" adventures.");
 
</syntaxhighlight>}}
 
  
  
Here's an example of displaying a proxy record in the CLI. Note that it displays all fields associated with that datatype.
+
If you need tips for editing the wiki, find that here: [[Help:Editing]].
<pre>
 
> ash $item[coffee pixie stick]
 
  
Returned: coffee pixie stick
+
*CLI Commands are usually only added to the [[CLI Reference]]. Only very complicated commands require their own page.
plural => coffee pixie sticks
 
descid => 936288573
 
image => cpstick.gif
 
levelreq => 4
 
quality =>
 
adventures => 5-10
 
muscle => 0
 
mysticality => 0
 
moxie => 0
 
fullness => 0
 
inebriety => 0
 
spleen => 4
 
notes =>
 
combat => false
 
reusable => false
 
usable => false
 
multi => true
 
seller => Arcade Ticket Counter
 
buyer => none
 
  
> ash $coinmaster[Arcade Ticket Counter]
+
*ASH commands need to be listed on their category page as well as on the [[Ash Functions]] list.
 +
**It is not necessary to always create a code sample, although it is preferred.
 +
**If you don't add a code sample, please remember to add '''needscode=yes|''' to the page.
  
Returned: Arcade Ticket Counter
 
token => ticket
 
item => Game Grid ticket
 
property =>
 
available_tokens => 10
 
buys => false
 
sells => true
 
  
> ash $location[Palindome]
+
== Missing Stuff ==
 +
r10025: Added "choice" CLI command, to resolve manual or unsupported choiceadventures
 +
Added "choice" CLI command, to resolve manual or unsupported choice
 +
adventures without having to visit the relay browser - which might be
 +
inconvenient if you're already in the CLI, and don't need to see the full
 +
adventure text to decide which option you want. With no parameter, "choice"
 +
just lists the options. With a numeric parameter, it picks that option.
 +
With any other parameter, it picks the first option containing that text (in
 +
either the actual button text, or mafia's spoiler text).
  
Returned: Palindome
+
r10033: a new command 'graygui' (or 'greygui' if you prefer that spelling)
nocombats => false
+
has been added to the CLI, which will print out all the entry points for all
zone => Plains
+
the stuff that still has a known open request sequence.
parent => Plains
 
parentdesc => Nearby Plains
 
  
> ash $skill[empathy of the newt]
 
  
Returned: Empathy of the Newt
+
I would like to list all valid adventuring conditions somewhere: (Is this all of them?)
level => 8
+
* {{pspan|X item}} will be fulfilled when you have X of item.
traincost => 6500
+
* {{pspan|+X item}} will be fulfilled when you have X more of the item than you previously possessed.
class => Turtle Tamer
+
* {{pspan|X choiceadv}} will be fulfilled when you encounter X choice adventures.
libram => false
+
* {{pspan|X autostop}} will be fulfilled when you encounter X autostop adventures.
passive => false
+
* {{pspan|X pirate insult}} will be fulfilled when you have learned X pirate insults.
buff => true
+
* {{pspan|X arena flyer ml}} will be fulfilled when you have flyered X ML worth of monsters.
combat => false
+
* {{pspan|X any itemtype}} will be fulfilled when you have X items that all have a partial match to itemtype, such as {{pspan|8 any paper strip}} or {{pspan|14 any fish meat}}.
permable => true
+
* {{pspan|level X}} will be fulfilled when your character is level X. This is useful for automated power leveling.
 +
* {{pspan|X muscle}}, {{pspan|X mysticality}} and {{pspan|X moxie}} will be fulfilled when the specified stat is at X.
 +
* Special conditions exist for several locations.
 +
** {{pspan|outfit}} is only valid in the Cobb's Knob Harem, Cobb's Knob Treasury, Frat House, Hippy Camp, Pirate Cove, Itznotyerzitz Mine, and eXtreme Slope.
 +
** {{pspan|castle map items}} is only valid in the Giant's Castle.
  
> ash $familiar[slimeling]
+
If you leave off the quantity X, then it is assumed to be 1.
 +
Remainder of possible conditions:
 +
* '''X meat'''
 +
* '''X health/mana'''
 +
* '''X% health/mana'''
 +
* '''X anything but Y''' (opposite of '''any''')
 +
* any/anything but can take multiple item names separated by | or /.
 +
* '''outfit''' can be preceded by the name of certain outfits, or the location where one normally drops, to specify a non-default outfit.  I'm not sure if there's any place where that's actually useful.
 +
* '''castle map items''' is technically valid everywhere; it's only non-stupid in the Giant's Castle.
 +
--[[User:Jasonharper|Jasonharper]] 04:39, 3 December 2011 (EST)
  
Returned: Slimeling
 
combat => true
 
hatchling => squirming Slime larva
 
image => slimeling.gif
 
name => Princess Vina
 
  
> ash $effect[sugar rush]
+
There's also a "location" command, which allows new zones to work like normal with the rest of mafia.
 +
 +
location 274 Lollipop Forest
 +
 +
Be careful, if you add the same location twice it can make a mess.
 +
Luckily, locations added this way are not remembered, so you can quit and restart if you mess it up.
  
Returned: Sugar Rush
+
 
default => use either 1 Angry Farmer candy, 1 Tasty Fun Good rice candy, 1 Crimbo candied pecan,
+
10078: ash function '''format_dtg'''
  Crimbo fudge, Crimbo peppermint bark, 1 Breath mint
+
10081: ash function format_dtg renamed to be
note =>
+
string format_date_time(inFormat, dtg, outFormat)
all => aggregate boolean [string]
+
more info: http://kolmafia.us/showthread.php?8451-time_to_string()-with-parameter&p=64058&viewfull=1#post64058
  use 1 Angry Farmer candy => true
+
 
  use 1 Tasty Fun Good rice candy => true
+
Modify examples on proxy record page because of:
  use 1 Crimbo candied pecan => true
+
10122: Add the boolean "fancy" and "candy" fields to item '''proxy records'''.
  use Crimbo fudge => true
+
10147: Initial support for "Crimbo 2011" coinmaster: trade candy for Candy Credits
  use Crimbo peppermint bark => true
+
10412: Add $skill '''proxy records''': .dailylimit and .timescast
  use 1 Breath mint => true
+
10879: Add a boolean "boss" field to $monster[]
image => http://images.kingdomofloathing.com/itemimages/hoppedup.gif
+
 
descid => 83695b70e0470a36125feca3198a16b4
+
10227: Add the "'''closet empty'''" CLI command, and the empty_closet() ASH function.
</pre>
+
 
 +
10250: '''kingLiberatedScript''' called when you break the prism.
 +
 
 +
10786: Add '''afterAdventureScript''', which is executed after each automated adventure
 +
before checking if goals have been satisfied.
 +
  - I did "set afterAdventureScript=use * small box;use * large box"
 +
  - I set my goal to be "+1 potion of inebriety"
 +
  - I told KoLmafia to go to the Dungeon of Doom for 20 adventures.
 +
  After each adventure which yielded a small box or a large box, my script used the box.
 +
  As soon as I got a potion of inebriety, KoLmafia stopped automating, with
 +
  "Conditions satisfied after 5 adventures".
 +
 
 +
  r10281 Add a "'''faxbot''' cmd" command which sends "cmd" to the first configure faxbot.
 +
 
 +
r9181, 9183, 9184 & r9190: moods per slyz's summary here: http://kolmafia.us/showthread.php?8852-Composable-Moods
 +
 
 +
r10343 "'''baron'''" CLI command to find the baron. "'''tavern'''" finds the faucet, as before
 +
r10344 Add '''tavern( string goal )''' ASH function.
 +
goal can be "faucet", "baron", or  "explore" (to explore all remaining unexplored squares).
 +
r10345 Add ASH '''tavern( "fight" )''' to explore cellar until the Baron's mansion is found
 +
and then go in to fight him.
 +
 
 +
r10396 Add "'''relayRunsBeforeBattleScript'''" to control whether manual adventuring will
 +
execute your "betweenBattleScript" (which is actually a "beforeBattleScript",
 +
either automated or manual)
 +
 
 +
r10753-6 '''get_goals()''' returns a string[int] containing all the conditions that KoLmafia will
 +
try to satisfy. Add g'''oal_exists()''' where you can pass in a goal type (choiceadv, autostop,
 +
meat, health, mana, item) and KoLmafia will tell you if there are any goals that match.
 +
 
 +
'''static''' scope is added!
 +
r10765: Add a "final" scope type to ASH which allows data/commands to be executed only
 +
once per session.
 +
r10772: A final declaration can either take a block, surrounded by {}, or a single
 +
command or declaration.
 +
r10774: ASH: "final" -> "static"
 +
 
 +
r10792: Support for Clan Jukebox:
 +
- _jukebox is true or false depending on whether you've visited the jukebox
 +
- Add jukebox command
 +
'''jukebox [#|mod|effect] - listen to a song'''
 +
# - 1, 2, 3, 4
 +
mod - meat, stats, item, initiative
 +
effect - Material Witness, No Worries, Techno Bliss, Metal Speed
 +
 
 +
10922: Add get_player_id method to ASH
 +
 
 +
10937: Add minstrel_quest() boolean function,
 +
which returns true when Clancy has a new quest for you.
 +
 
 +
10946: Add the "swim" CLI command.
 +
 
 +
== Needs Major Work ==
 +
 
 +
[[Proxy Records]] is only slightly better than a placeholder.
 +
 
 +
In r10047, the adventure tab interface was altered. Fix SinginSally's guide on pages...
 +
 +
http://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Attack_Script
 +
http://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Custom_Combat_Script
 +
http://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Goal-Oriented_Adventuring
 +
 
 +
Information on moods calling other moods: http://kolmafia.us/showthread.php?8852-Composable-Moods&p=66468&viewfull=1#post66468
 +
 
 +
== Needs Code Samples ==
 +
 
 +
There is a list of all pages that require code samples: [[:Category:Needs_Code_Sample|Category:Needs Code Sample]]
 +
 
 +
Information on how to create a code sample: [[Template:CodeSample]]

Revision as of 20:35, 1 May 2012

"To Do" List

This is a list of stuff that is missing from the wiki or else needs major work. Please help!


If you need tips for editing the wiki, find that here: Help:Editing.

  • CLI Commands are usually only added to the CLI Reference. Only very complicated commands require their own page.
  • ASH commands need to be listed on their category page as well as on the Ash Functions list.
    • It is not necessary to always create a code sample, although it is preferred.
    • If you don't add a code sample, please remember to add needscode=yes| to the page.


Missing Stuff

r10025: Added "choice" CLI command, to resolve manual or unsupported choiceadventures 
Added "choice" CLI command, to resolve manual or unsupported choice
adventures without having to visit the relay browser - which might be
inconvenient if you're already in the CLI, and don't need to see the full
adventure text to decide which option you want. With no parameter, "choice"
just lists the options. With a numeric parameter, it picks that option. 
With any other parameter, it picks the first option containing that text (in
either the actual button text, or mafia's spoiler text).
r10033:  a new command 'graygui' (or 'greygui' if you prefer that spelling) 
has been added to the CLI, which will print out all the entry points for all
the stuff that still has a known open request sequence.


I would like to list all valid adventuring conditions somewhere: (Is this all of them?)

  • X item will be fulfilled when you have X of item.
  • +X item will be fulfilled when you have X more of the item than you previously possessed.
  • X choiceadv will be fulfilled when you encounter X choice adventures.
  • X autostop will be fulfilled when you encounter X autostop adventures.
  • X pirate insult will be fulfilled when you have learned X pirate insults.
  • X arena flyer ml will be fulfilled when you have flyered X ML worth of monsters.
  • X any itemtype will be fulfilled when you have X items that all have a partial match to itemtype, such as 8 any paper strip or 14 any fish meat.
  • level X will be fulfilled when your character is level X. This is useful for automated power leveling.
  • X muscle, X mysticality and X moxie will be fulfilled when the specified stat is at X.
  • Special conditions exist for several locations.
    • outfit is only valid in the Cobb's Knob Harem, Cobb's Knob Treasury, Frat House, Hippy Camp, Pirate Cove, Itznotyerzitz Mine, and eXtreme Slope.
    • castle map items is only valid in the Giant's Castle.

If you leave off the quantity X, then it is assumed to be 1. Remainder of possible conditions:

  • X meat
  • X health/mana
  • X% health/mana
  • X anything but Y (opposite of any)
  • any/anything but can take multiple item names separated by | or /.
  • outfit can be preceded by the name of certain outfits, or the location where one normally drops, to specify a non-default outfit. I'm not sure if there's any place where that's actually useful.
  • castle map items is technically valid everywhere; it's only non-stupid in the Giant's Castle.

--Jasonharper 04:39, 3 December 2011 (EST)


There's also a "location" command, which allows new zones to work like normal with the rest of mafia.

location 274 Lollipop Forest

Be careful, if you add the same location twice it can make a mess. 
Luckily, locations added this way are not remembered, so you can quit and restart if you mess it up.


10078: ash function format_dtg
10081: ash function format_dtg renamed to be
string format_date_time(inFormat, dtg, outFormat)
more info: http://kolmafia.us/showthread.php?8451-time_to_string()-with-parameter&p=64058&viewfull=1#post64058
Modify examples on proxy record page because of:
10122: Add the boolean "fancy" and "candy" fields to item proxy records.
10147: Initial support for "Crimbo 2011" coinmaster: trade candy for Candy Credits
10412: Add $skill proxy records: .dailylimit and .timescast
10879: Add a boolean "boss" field to $monster[]
10227: Add the "closet empty" CLI command, and the empty_closet() ASH function.
10250: kingLiberatedScript called when you break the prism.
10786: Add afterAdventureScript, which is executed after each automated adventure 
before checking if goals have been satisfied.
 - I did "set afterAdventureScript=use * small box;use * large box"
 - I set my goal to be "+1 potion of inebriety"
 - I told KoLmafia to go to the Dungeon of Doom for 20 adventures.
 After each adventure which yielded a small box or a large box, my script used the box. 
 As soon as I got a potion of inebriety, KoLmafia stopped automating, with 
 "Conditions satisfied after 5 adventures".
r10281 Add a "faxbot cmd" command which sends "cmd" to the first configure faxbot.
r9181, 9183, 9184 & r9190: moods per slyz's summary here: http://kolmafia.us/showthread.php?8852-Composable-Moods
r10343 "baron" CLI command to find the baron. "tavern" finds the faucet, as before
r10344 Add tavern( string goal ) ASH function. 
goal can be "faucet", "baron", or  "explore" (to explore all remaining unexplored squares). 
r10345 Add ASH tavern( "fight" ) to explore cellar until the Baron's mansion is found 
and then go in to fight him.
r10396 Add "relayRunsBeforeBattleScript" to control whether manual adventuring will
execute your "betweenBattleScript" (which is actually a "beforeBattleScript",
either automated or manual)
r10753-6 get_goals() returns a string[int] containing all the conditions that KoLmafia will 
try to satisfy. Add goal_exists() where you can pass in a goal type (choiceadv, autostop, 
meat, health, mana, item) and KoLmafia will tell you if there are any goals that match.
static scope is added!
r10765: Add a "final" scope type to ASH which allows data/commands to be executed only 
once per session.
r10772: A final declaration can either take a block, surrounded by {}, or a single
command or declaration.
r10774: ASH: "final" -> "static"
r10792: Support for Clan Jukebox:
- _jukebox is true or false depending on whether you've visited the jukebox
- Add jukebox command
jukebox [#|mod|effect] - listen to a song
# - 1, 2, 3, 4
mod - meat, stats, item, initiative
effect - Material Witness, No Worries, Techno Bliss, Metal Speed
10922: Add get_player_id method to ASH
10937: Add minstrel_quest() boolean function,
which returns true when Clancy has a new quest for you.
10946: Add the "swim" CLI command.

Needs Major Work

Proxy Records is only slightly better than a placeholder.

In r10047, the adventure tab interface was altered. Fix SinginSally's guide on pages...

http://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Attack_Script
http://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Custom_Combat_Script
http://wiki.kolmafia.us/index.php?title=KoLmafia_Guide:_Goal-Oriented_Adventuring
Information on moods calling other moods: http://kolmafia.us/showthread.php?8852-Composable-Moods&p=66468&viewfull=1#post66468

Needs Code Samples

There is a list of all pages that require code samples: Category:Needs Code Sample

Information on how to create a code sample: Template:CodeSample