imported>Bale |
|
Line 1: |
Line 1: |
− | {{TOCright}}
| |
| | | |
− | == "To Do" List == | + | ==== KoLmafia has migrated to the GitHub with gradle builds. ==== |
| | | |
− | This is a list of stuff that is missing from the wiki or else needs major work. Please help!
| |
| | | |
| + | [https://www.jetbrains.com/idea/ IntelliJ IDEA] is an IDE for developing Java applications. This guide assumes that you have a recent enough version of Java JDK, Ant, and IntelliJ IDEA. Completing [[Compiling from Source]] is a requirement for this guide, although experienced developers can skip to whatever step is appropriate. |
| | | |
− | If you need tips for editing the wiki, find that here: [[Help:Editing]].
| + | The following instructions are based on IntelliJ IDEA 2021.2 Community Edition. Instructions for other versions/editions of IntelliJ may be slightly different. The latest version is recommended. |
| | | |
− | *CLI Commands are usually only added to the [[CLI Reference]]. Only very complicated commands require their own page.
| + | == Create a Project == |
| + | === Create a new project === |
| + | # Start IntelliJ IDEA. In the ''Welcome to IntelliJ IDEA'' dialog, click '''Get from VCS'''.<br>[[File:Intellij-setup-c2021.2-welcome.png|300px]] |
| + | # In the ''Get from Version Control'' dialog, select the '''Repository URL''' tab. |
| + | ## In ''Version control'', select '''GitHub'''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs.png|300px]] |
| + | ## Add a new repository location. To do so, click the '''+''' button next to ''Repositories''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs-subversion.png|300px]] |
| + | ## In the ''New Repository Location'' popup, enter the URL to KoLmafia's GitHub repository. If you have a GitHub account and a Personal Access Token, use git@github.com:kolmafia/kolmafia.git If you do not have a GitHub account, use https://github.com/kolmafia/kolmafia.git<br>[[File:Intellij-setup-c2021.2-new-repository-location.png|200px]] |
| + | ## Click '''OK''' to close the popup. |
| + | ## Once the repository has been added, '''click the repository URL to highlight it''', then click '''Check Out'''.<br>[[File:Intellij-setup-c2021.2-get-from-vcs-check-out.png|300px]] |
| + | # If the ''Destination Directory'' popup appears, choose a directory to check out the working copy.<br>''Caution'': Don't choose a common directory like <samp>C:\Users\<username>\Documents</samp>. Instead, create a new directory under it (by clicking the folder icon) and give it an appropriate name (e.g. <samp>kolmafia</samp>).<br>[[File:Intellij-setup-c2021.2-choose-working-copy-dir.png|200px]]<br>Click '''OK''' to continue. |
| + | # IntelliJ will generate a new project. If it asks you whether to add <code>kolmafia.iml</code> to Subversion, you may click '''Cancel''' to skip it |
| | | |
− | *ASH commands need to be listed on their category page as well as on the [[Ash Functions]] list.
| + | === Add the Gradle Build File === |
− | **It is not necessary to always create a code sample, although it is preferred.
| + | # Open the Gradle Toolbar Item (typically on the right side, and not very large) |
− | **If you don't add a code sample, please remember to add '''needscode=yes|''' to the page.
| + | # Click the '''+''' button to add a build file |
| + | # Choose build.gradle from the file selector and press Open |
| + | #Run Configurations should contain <code>kolmafia [runShadow]</code>. If it does not, continue to the next steps. |
| + | #In the Gradle Toolbar click on the elephant to Execute Gradle Task |
| + | #A window titled ''Run Anything'' will popup. Search for <code>runShadow</code> and select it |
| | | |
− | | + | ===How to build and run/debug=== |
− | == Missing Stuff == | + | #Click the drop down in the top right and select the desired option |
− | r9181, 9183, 9184 & r9190: '''moods''' per slyz's summary here: http://kolmafia.us/showthread.php?8852-Composable-Moods
| + | ##<code>kolmafia [runShadow]</code> is the application itself |
− | | + | ##<code>Tests in 'KoLMafia'</code> are the unit tests |
− | 13213: Add "debug ash on" and "debug ash off" to turn on and off ASH script tracing
| + | #Click the play button to build and run |
− | ASH tracing goes into ASH_datestamp.txt
| + | #Or click the bug button to build and debug |
− | | |
− | r14729: add fixedThreadPoolSize pref - diagnostic/fine tuning for limiting the threadpool size.
| |
− | | |
− | '''test CLI commands:'''
| |
− |
| |
− | r14764: add "test xpath" to, well, test xpath expressions
| |
− | r14767: Expose an xpath function that relay scripts can use after they've invoked visit_url().
| |
− | http://kolmafia.us/showthread.php?16722-the-DOM-regex-scalability-and-other-jargony-words
| |
− | http://kolmafia.us/showthread.php?16764-xpath-primer
| |
− |
| |
− | r14967: Add "test mchat" command which can be used after "test load JSONFILE"
| |
− |
| |
− | This is how test newitem is used!
| |
− | http://kolmafia.us/showthread.php?17365-When-detecting-new-items-detect-new-outfits-too&p=119368&viewfull=1#post119368
| |
− | r15741, Now "test newitem descId" no longer requires itemId.
| |
− |
| |
− | r15176: Add "test adventure URL" CLI command to see how we translate the given URL
| |
− |
| |
− | r15239: Add "test dump_disabled_skills" to the gCLI to aid upcoming debugging
| |
− |
| |
− | r15606: Add "test encounter URL" command.
| |
− |
| |
− | r15874: Add "test leet NAME" command to check if KoL monster names get translated successfully from their 1337 versions.
| |
− |
| |
− | r15883: "test load HTMLFILE" followed by "test aagain" will print the Adventure Again URL from that page.
| |
− | | |
− | r13980: Add is_unrestricted( item/familiar/skill/string ) to see if something can be used in the current path.
| |
− | | |
− | r15102: Add ASH functions:
| |
− | '''string [int] all_normal_outfits()''' -> returns map out all outfit names index by outfit number.
| |
− | '''string outfit_tattoo( string name )''' -> returns image file name of outfit tattoo
| |
− |
| |
− | r15928: Add "test monster" command to parse the monster out of the saved HTML and save
| |
− | it where ASH's last_monster() function will fetch it.
| |
− | | |
− | r15115: Parse Chateau furniture when viewed and at login. Make it available through '''get_chateau()'''
| |
− | Add chateauAvailable to track whether you have it (currently only updated by visiting the Mountains),
| |
− | chateauMonster to track the monster in the painting, and _chateauMonsterFought to track if you have fought it.
| |
− | | |
− | r15120: Add ASH '''holiday()''' function.
| |
− | returns a string which has one of the following, as appropriate: game/real; game; real; ""
| |
− | | |
− | r15148: Track Xiblaxian holo-wrist-puter drops in '''_holoWristDrops''', and progress toward the next drop in '''_holoWristProgress'''.
| |
− | | |
− | r15177: Track which keys have been used on the Sorceress Tower door in a setting: '''nsTowerDoorKeysUsed'''
| |
− | It is a comma separated list.
| |
− | | |
− | r15235: Add buffer '''run_choice( int )''' command. When in a choice adventure, use this to submit the selected option.
| |
− | With -1 as imput, it will automate the rest of the choice using existing settings.
| |
− |
| |
− | Also add '''run_turn()''', which will work as run_combat() or run_choice( -1 ) depending on whether you are in combat or in a choice.
| |
− | | |
− | r15238: Provide '''limit_mode()''' function that returns (currently) null or spelunky.
| |
− | | |
− | r15354: Move "equip all familiars" function from the FamiliarTrainingFrame to a new
| |
− | module: FamiliarManager. Let ASH use it via boolean '''equip_all_familiars()'''
| |
− | | |
− | r15440: Add "'''servants'''" command to list Ed's servants, "'''servant'''" to list status of your current servant,
| |
− | and "'''servant TYPE'''" to switch to the servant of the specified type.
| |
− | | |
− | r15441 adds the $servant data type to ASH and the following functions to manipulate them:
| |
− |
| |
− | int '''to_servant'''( servant )
| |
− | servant to_servant( int )
| |
− | servant to_servant( string )
| |
− | servant '''my_servant'''()
| |
− | boolean '''have_servant'''( servant )
| |
− | boolean '''use_servant'''( servant )
| |
− |
| |
− | Additionally, it has the following proxy fields:
| |
− | int id
| |
− | string name
| |
− | int level
| |
− | int experience
| |
− | string image,
| |
− | string level1_ability
| |
− | string level7_ability
| |
− | string level14_ability
| |
− | string level21_ability
| |
− | | |
− | r15466: Add '''chew'''(INT,ITEM) to ASH for cnsuming spleen toxins
| |
− | | |
− | equip [2268] will equip an item by number.
| |
− | | |
− | r15475: Add '''prefref''' as a built-in gCLI command
| |
− | | |
− | r15590: '''Add run_combat( string filter )'''.
| |
− | | |
− | r15676: Make built-in Sorceress Tower scripts available to scripts.
| |
− | | |
− | CLI: '''maze''' [arg]
| |
− | CLI: '''door'''
| |
− | | |
− | '''hedge_maze( string )'''
| |
− | '''tower_door()'''
| |
− |
| |
− | The string argument for the maze can be one of:
| |
− | traps - 4 turns, all traps
| |
− | gopher or duck - 7 turns gopher and duck
| |
− | chihuahua or kiwi - 7 turns chihuahua and kiwi
| |
− | nugglets - 10 turns, all nugglets
| |
− | | |
− | r15791: The "pvp" command with no arguments will list available stances and their
| |
− | associated option number. You now can now specify a stance by either name or
| |
− | number. The "pvp" command now requires you to choose a stance, since it can
| |
− | no longer choose a reaosnable default based on your stats.
| |
− | | |
− | r15796: Add ASH function: '''int [string] current_pvp_stances()'''
| |
− | | |
− | r15840: Provide ASH '''string leetify( string )''' function to garble strings.
| |
− | | |
− | r15847: Add "Random Monster Attributes" modifier as provided by dice items and the
| |
− | Curse of Randomness status effect. Add random_attributes proxy field to ASH
| |
− | $monster type. Munge random attributes from monster names is the Random Monster
| |
− | Attribute modifier is > 0, not only if current path is One Crazy Random Summer.
| |
− | | |
− | r15922: Add Familiar Script. This script will run after changing familiars, before
| |
− | automatically changing familiar equipment. The script should have a boolean main() function.
| |
− | Returning true will cause normal familiar equipiment switching to be skipped,
| |
− | while false will lead to it running after the script returns.
| |
− | | |
− | r15937: Add mayosoak command
| |
− | | |
− | r15959: Add knowledge of familiar drop counters to FamiliarData,
| |
− | New ASH proxy fields for $familiar data type:
| |
− | drop_name = short name of the thing that drops
| |
− | drop_item = if it is a single item, the $item. Otherwise, $item[none]
| |
− | drops_today = how many things this familiar has dropped so far today
| |
− | drops_limit = the maximum number of available drops from this familiar today
| |
− | | |
− | CLI: wumpus status - Display status of last wumpus cave.
| |
− | r16014: Add "wumpus replay FILE" command to process the session log of a wumpus exploration and make deductions, etc.
| |
− | r16015: Add "wumpus reset" CLI command to clear in-memory Wumpus cave state
| |
− | | |
− | r16044:The "cheat" command is a synonym for the "play" command. options:
| |
− | play random - play a random card (1 draw)
| |
− | cheat phylum PHYLUM - cheat (5 draws) a fight with specified phylum
| |
− | cheat stat STAT - cheat (5 draws) 500 substats of specified stat
| |
− | cheat buff BUFF - cheat (5 draws) 20 turns of the specified buff, either by name
| |
− | or by effect: muscle, mysticality, moxie, item drop (or items), initiative
| |
− | cheat CARD - cheat (5 draws) the specified card name.
| |
− | PHYLUM, STAT, BUFF, and CARD all use fuzzy matching.
| |
− | | |
− | r16047: Track Armorer quest (Madness Bakery) as questM25Armorer.
| |
− | | |
− | r16060: Make fixed list of modifier maximizer strings configurable
| |
− | set maximizerList. Default value is:
| |
− | mainstat | mus | mys | mox | familiar weight | HP | MP | ML | DA | DR | +combat -tie | -combat -tie | initiative | exp | meat drop | item drop | 2.0 meat, 1.0 item | item, sea | weapon dmg | ranged dmg | elemental dmg | spell dmg | adv | pvp fights | hot res | cold res | spooky res | stench res | sleaze res | all res | mp regen | ML, 0.001 slime res | 4 clownosity, -tie | 7 raveosity, -tie | surgeonosity | +four songs
| |
− | | |
− | r16163: For all monsters where our name differs from Manuel's, add a new attribute: Manuel: "MANUEL NAME"
| |
− | Add .manuelName proxy field for ASH $monster data type
| |
− |
| |
− | Add "'''checkmanuel'''" command which will look up all of you
| |
− |
| |
− | '''int monster_factoids_available( monster )'''
| |
− |
| |
− | returns number of factoids currently retained in memory. Note that this
| |
− | can be more than the currently logged in character knows, since we don't
| |
− | flush the factoids from a previous login if you know all three factoids.
| |
− |
| |
− | '''string monster_manuel_text( monster )'''
| |
− |
| |
− | returns the full HTML of the monster manuel entry for the given
| |
− | monster. As above, this could have been retained from the previous
| |
− | character; otherwise, it will fetch and cache the text.
| |
− | | |
− | r16166: Add ASH function: '''boolean [monster] all_monsters_with_id()'''
| |
− |
| |
− | returns a map of all monsters that have a non-zero monster ID. It builds this
| |
− | afresh every time you call it, since new monsters can be (temporarily) added
| |
− | | |
− | == 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]]
| |
− | [[Category:Contributing]]
| |