New Content - Implemented Source Terminal

lostcalpolydude

Developer
Staff member
I use it all the time if I want to make a fax or buffbot request and do not have the relay browser open.
Doing so is a whole lot faster than opening the relay browser and opening chat there.

Fortunately, "your ideal world" and "my ideal world" can co-exist. ;)

I guess that's a funny case where you don't actually want to see chat, you just want mafia to see a response message in chat.
 

Theraze

Active member
I guess that's a funny case where you don't actually want to see chat, you just want mafia to see a response message in chat.

It's the only time I use chat, not being especially loquacious. :) I can run login <character>, chat, faxtoid, use photo mon, farm false, login <next character>, and just run through my aftercore farming including knocking out a new factoid. If I could receive faxes or close the chat window to reduce server hits after the fax came, I would, but since it isn't an option, at least it will eventually reduce how many server checks it makes for my non-chatting chat window.
 
Ok got an interesting one. I extruded a source googles and when I maximized for +item it told me to put it in all 3 accessory slots even though I only had one. Also, while I had it equipped while adventuring it keep incrementing like I was finding more of them but when I looked in my inventory I only had 1. by the time I was done mafia though I had 10 but kol still showed just one.
 

fronobulax

Developer
Staff member
I guess that's a funny case where you don't actually want to see chat, you just want mafia to see a response message in chat.

When I started using mafia's faxbot functionality, I kept getting GCLI messages that suggested mafia had no idea whether the request failed or succeeded. I was told to open mafia's chat and then mafia would correctly determine the status/result of the request. But I almost never look at the chat window. Funny? Maybe but I don't look at the window that is forced to be open on a daily basis :)
 

lostcalpolydude

Developer
Staff member
Ok got an interesting one. I extruded a source googles and when I maximized for +item it told me to put it in all 3 accessory slots even though I only had one. Also, while I had it equipped while adventuring it keep incrementing like I was finding more of them but when I looked in my inventory I only had 1. by the time I was done mafia though I had 10 but kol still showed just one.

Already a known issue, every time you looked at the terminal mafia thought you got another one.
 

Yendor

Member
Couple more effects:
Code:
--------------------
2107	damage.enh	10101.gif	66a3192cd03222c792def0fe0bc20b07
Effect	damage.enh	Hot Damage: +5, Cold Damage: +5, Stench Damage: +5, Spooky Damage: +5, Sleaze Damage: +5
--------------------
--------------------
2108	critical.enh	10101.gif	6d62a2abfbdaebe40987517bf987e9b4
Effect	critical.enh	Critical Hit Percent: +10, Spell Critical Percent: +10
--------------------
 

VladYvhuce

Member
Sooo.... What exactly does the Software Bug do? I know that it spits out seemingly random code during combat. Does that do anything? Or is it just there to look pretty?
 
I thought maybe I'd found a workaround, but was disappointed to find that chat_clan("/terminal [command]"); also does not work for sending commands to the Terminal. I'm still hoping for CLI commands, but I'm not sure whether that's possible, given what I now know about how various flavors of chat interface work/don't work...
 

Bale

Minion
Sooo.... What exactly does the Software Bug do? I know that it spits out seemingly random code during combat. Does that do anything? Or is it just there to look pretty?

One always hopes that a software bug does nothing. If that's all the familiar does, then I am grateful.

PS. There's a hint that the code it spits out is essential for the puzzle.
 

VladYvhuce

Member
One also doesn't typically walk around with a rattle snake strapped to one's back, but it works out rather well in KOL... So, there's always a chance that something that you'd never want to encounter IRL may be helpful in the game...
 

Bale

Minion
Yes. Known issue. Every single time you click on your Source Terminal it acquires every single item that you've previously acquired. This has been reported quite a few times before you.

Eventually it will stop, but it might take a while since the situation is not simple and requires one of the devs to finish a solution to a very complicated problem involving everything the terminal does.
 

Veracity

Developer
Staff member
I made a DEBUG log today for this.

Requesting: https://www.kingdomofloathing.com/campground.php?action=terminal
Retrieved: https://www.kingdomofloathing.com/campground.php?action=terminal
Field: Location = [choice.php?forceoption=0]
Requesting: https://www.kingdomofloathing.com/choice.php?forceoption=0
Retrieved: https://www.kingdomofloathing.com/choice.php?forceoption=0
---> We are now in "Source Terminal"
---> The input is a hidden form:

Code:
<form method="post" action="choice.php"><input type="hidden" name="pwd" value="1275e1c0f6cb9d273f686b4fe79deb33" /><input type="hidden" name="whichchoice" value="1191" /><input type="hidden" name="option" value="1" /><input type="text" name="input" autocomplete="off" id="input" style="height: 1; width: 1; margin-left: -1000px" /></form>

Requesting: https://www.kingdomofloathing.com/choice.php?pwd&whichchoice=1191&option=1&input=extrude+-f+booze.ext
Retrieved: https://www.kingdomofloathing.com/choice.php?pwd&whichchoice=1191&option=1&input=extrude+-f+booze.ext
Code:
<div>You acquire an item: <a href="#" style="text-decoration: none; font-weight: bold" onclick="descitem(484716153)">hacked gibson</a></div>
Processing results...
You acquire an item: hacked gibson
Processing result: hacked gibson
---> I got my first booze

Requesting: https://www.kingdomofloathing.com/choice.php?pwd&whichchoice=1191&option=1&input=extrude+-f+booze.ext
Retrieved: https://www.kingdomofloathing.com/choice.php?pwd&whichchoice=1191&option=1&input=extrude+-f+booze.ext
Code:
<div>You acquire an item: <a href="#" style="text-decoration: none; font-weight: bold" onclick="descitem(484716153)">hacked gibson</a></div><div></div><div>You acquire an item: <a href="#" style="text-decoration: none; font-weight: bold" onclick="descitem(484716153)">hacked gibson</a></div>
---> It added a single line to the output.
Processing results...
You acquire an item: hacked gibson
Processing result: hacked gibson
You acquire an item: hacked gibson
Processing result: hacked gibson
---> We parsed both results.

I think the following is the plan:

1) Turn off automatic result processing for choice.php?whichchoice=1191
2) In post-choice processing for that choice, the "input" field tells us what we attempted: input=extrude+-f+booze.ext
3) Depending on the command, there might be a "result"
--- "extrude -f xxx" might create an item
It might also say "extrude system limits exceeded. try again tomorrow."
There is presumably a message for invalid target
There is presumably a message for not enough Source essence available.
--- "educate xxx" might change the combat skill you can use - a DRAM chip installed lets you you have an "additional education", right? Otherwise, presumably you replace one of your skills. (If you can have two and try to learn another one, which is replaced?)
--- "enquiry xxx.enq" says "enquire mode set: xxx.enq" or "Invalid or missing enquiry target provided".
--- "enhance xxx.enh" might give you an effect.
You acquire an effect: init.enh (duration: 55 adventures)
It might say "Invalid or missing enhance target provided"
It might say "enhance limit exceeded" and "install CRAM chip to increase limit"

Therefore, we look for results for the following inputs:

"extrude -f xxx.ext"
---> If the extrude succeeded, add the appropriate item to inventory and remove the appropriate amount of Source essence
"educate xxx.edu"
---> If this succeeded, add the appropriate combat skill (and presumably remove a combat skill)
"enquiry xxx.enq"
---> If this succeeded and we decide to track it, remember which rollover effect we will get,
"enhance xxx.enh"
---> If this succeeded, add the appropriate effect with the appropriate duration.

By the way:

Code:
--------------------
2108	critical.enh	10101.gif	6d62a2abfbdaebe40987517bf987e9b4
Effect	critical.enh	Critical Hit Percent: +10, Spell Critical Percent: +10
--------------------
I found the source file today and loaded it into my terminal.

For now, the easiest solution might be this:

1) Turn off result processing for choice 1191
2) Call a function with TBD content to handle the results.
3) For now:
---> if input starts with "extrude -f ", refresh inventory, which will adjust both item and Source essence
---> if input starts with "enhance", call api.php to refresh status effects.

It would be nice to do it without server hits, but that will require looking for failures.
We can do that later.

By the way - if we decide to make a cli command to do some of these things:

campground.php?action=terminal
choice.php?forceoption=0
choice.php?pwd&whichchoice=1191&option=1&input=XXXXX (URL encoded, so spaces become + and so on)
choice.php?pwd&whichchoice=1191&option=1&input=exit (which will leave the terminal screen clean for next time)
 

heeheehee

Developer
Staff member
Vague idea of how I'd do this, with no idea if this would work at all:

- if looking at source terminal,
-- if command submitted (accessible from the form fields of the request) starts with "extrude -f" or "enhance", then only pass the last line to ResultProcessor.
-- else, do not parse item drops from this page.

Relevant URLs:
Code:
campground.php?action=terminal&hack=<command>
choice.php?whichchoice=1191&option=1&input=<command>

Veracity seems to have posted before me, in much greater detail (and likely a more accurate description of the solution). I'd like to comment that the first URL is adequate for submitting a command, which should simplify the logic of the TerminalHackCommand.
 

Veracity

Developer
Staff member
Also by the way:

inv_use.php?pwd&which=3&whichitem=9048&ajax=1
You've already installed a ASHRAM chip in your Source terminal.

inv_use.php?pwd&which=3&whichitem=9065&ajax=1
You've already installed a copy of dram.ext on your Source terminal.

We should not remove the item from inventory in such cases.
 

heeheehee

Developer
Staff member
There is presumably a message for invalid target
There is presumably a message for not enough Source essence available.

Invalid target (e.g. "extrude devster.ext") has the same message as "extrude" without any parameters.

The latter is as follows:
Code:
<div>Insufficient essence to create target item, 0/100 supplied</div>
 

Veracity

Developer
Staff member
More:

Looking at statuseffects.txt

2107 is likely "damage.enh"
2111 is likely "protect.enq"

Code:
9040	Source terminal PRAM chip	688502238	ic.gif	usable	d	5
9041
9042	Source terminal SPAM chip	767438327	ic.gif	usable	d	5
9043	Source terminal CRAM chip	422138193	ic.gif	usable	d	50
9044	Source terminal DRAM chip	418327179	ic.gif	usable	d	50
9045
9046	Source terminal INGRAM chip	865810339	ic.gif	usable	t,d	500
9047	Source terminal DIAGRAM chip	376755223	ic.gif	usable	t,d	500
9048	Source terminal ASHRAM chip	528655579	ic.gif	usable	t,d	500
9049	Source terminal SCRAM chip	272321367	ic.gif	usable	t,d	500
9050	Source terminal TRIGRAM chip	269331627	ic.gif	usable	t,d	500
Any clue about 9041 and 9045 yet?
 

Veracity

Developer
Staff member
Ah.

Code:
9061	Source terminal file: pram.ext	698490933	floppy.gif	usable	t,d	10
9062	Source terminal file: gram.ext	893085212	floppy.gif	usable	t,d	10
9063	Source terminal file: spam.ext	752493567	floppy.gif	usable	t,d	10
9064	Source terminal file: cram.ext	986416765	floppy.gif	usable	t,d	10
9065	Source terminal file: dram.ext	688494716	floppy.gif	usable	t,d	10
9066	Source terminal file: tram.ext	138940093	floppy.gif	usable	t,d	10
I bet that 9041 is "Source terminal GRAM chip" and 9045 is "Source terminal TRAM chip"
 

Veracity

Developer
Staff member
Yeah. Turns out the Wiki has the corect descids for the two missing items and the two missing effects. Added in 16989.
 
Top