CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Mod Java Onhold Stakhan

MadDany

Member
Jul 9, 2017
317
385
Is it possible to request a custom script for kamihime? I'm too dumb to understand script making, don't even understand how to edit the default one. :/
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Hey
Is it possible to request a custom script for kamihime? I'm too dumb to understand script making, don't even understand how to edit the default one. :/
Hey MadDany,

Thank you for your question. Custom script is a bit vague, so you need to be a bit more precise. Depending on the complexity of your request, I might do it, or not :)

As for the complexity of the configuration files, I acknowledge the fact that I am completely out of touch with how normal people look at computers. I could explain some more about editing this configuration file, but I would like to hear your question first. If your goal can be accomplished with the configuration file alone, I will tell you what, where and why. Otherwise, I might have to write some code first and add new configuration options to the configuration file.

PS: I hope that you have managed to run the bot already :)
 

MadDany

Member
Jul 9, 2017
317
385
Hey


Hey MadDany,

Thank you for your question. Custom script is a bit vague, so you need to be a bit more precise. Depending on the complexity of your request, I might do it, or not :)

As for the complexity of the configuration files, I acknowledge the fact that I am completely out of touch with how normal people look at computers. I could explain some more about editing this configuration file, but I would like to hear your question first. If your goal can be accomplished with the configuration file alone, I will tell you what, where and why. Otherwise, I might have to write some code first and add new configuration options to the configuration file.

PS: I hope that you have managed to run the bot already :)
I have run the bot already at least. But after using it for a while I think I've found problems, if it is a problem or my on inept ability. After looking at the file it's supposed to do the cave of training and rank 2 acc quest right? It never did them. Also it's supposed to auto sell duplicates SSRs? But it hasn't as well. I never touched the script so I'm not sure what happened. Everything else like doing raids, gache etc. still works.
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Thanks a bunch for the feedback and verifying these results. Much appriciated :). What you have found are indeed some bugs from me ...

1. The dailies not being played.


The "dailies" playQuest activity should play just like you say. It has in fact 3 entries, so it will first do the cave training, then accessory (up until it's no longer playable) and then whatever else is available with the highest AP cost under 25 points.

Yesterday I have found a little problem, that caused this activity to fail - or in particular, the `spQuestSearchStrategy` was failing. This ended up with this activity being abandoned by the stakhan, while other activities continued playing. You might have not even noticed that it has failed.

Yesterday I have added a bugfix for that and uploaded the newer version. I suggest that you try download this newer version and try run the troublesome activity in isolation, using the following configuration file:

XML:
<?xml version="1.0" encoding="UTF-8" ?>
<kamihime-activity-list-job xmlns="urn:stakhan:kamihime"
                            game-session-provider="mini.stakhan.nutaku.games.KhSessionProvider">
    <playQuest displayName="dailies">
        <spQuestSearchStrategy>
            <questMatcher type="accessory" name="Rank 2"/>
            <questMatcher type="daily" name="Cave of Training"/>
            <questMatcher maxCost="25"/>
        </spQuestSearchStrategy>
        <recoveryManager halfElixirs="1" elixirs="0"/>
        <basicBattleStrategy/>
        <countContinuationStrategy maxWins="9999" maxLoses="1"/>
    </playQuest>
</kamihime-activity-list-job>
If activity works, then it's fine. You can bring back the rest of the configuration and restart :)
Otherwise, if the problem still persists, please send me a private message, with the text files saved to 'logs' and I will try to fix it from there.


2. Selling duplicate SSRs.

I have just checked on my own account. Yes, you seem to be correct. I knew I had like 6 of the same SSRs weapons after last event and I ended up with 1 fully evolved (good) and 1 untouched which should be sold (bad bug) xD

It's a little bit troublesome, but not a big thing. We gotta live with it for now, I will sit down to it 18th or 19th, and upload the fixed version then.
 

MadDany

Member
Jul 9, 2017
317
385
Question about enhancing: Is the enhancing only for equiped items?

Also is it possible to make it enhance a random r summon/weapon just for the daily, in this case its because the bot couldn't find any thing to enhance previously so having it enchance just one random r item would help with the daily mission. Might as well get that 50 jewel right?
 
Last edited:

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Question about enhancing: Is the enhancing only for equiped items?

Also is it possible to make it enhance a random sr summon/weapon just for the daily, in this case its because the bot couldn't find any thing to enhance previously so having it enchance just one random sr item would help with the daily mission. Might as well get that 50 jewel right?
Oh yes, certainly we could do that. We could also make it donate to a union when there is that mission. That will take some careful design and work though. :)

As for the the enhancing non-equipped items

The enhance part of the "equipmentControl" activity determines the set of items to be enhanced and starts enhancing them in some order (which may seem random). By default, it's not limitted to equipped items. You can see the base query under the "<enhancer>" element. Note that if every equipment in that computed set is already max-level (with target skill level and bonus level) then the activity should conclude that there is nothing to enhance.
 
Last edited:

MadDany

Member
Jul 9, 2017
317
385
What if I just want to enhance only equiped weapons. I don't really want to waste materials on enhancing weapons I dont use.
 

MadDany

Member
Jul 9, 2017
317
385
An idea

Instead of bunching up all the actions. Separate them into only 1 scripts each so that we wont waste time or AP or BP. When union events comes, then use a script that only does union raids and nothing else. And a script that only does cave of gold ore (For xp grinding, tho i'm not sure if you are able to make it choose which party to get, i do have a part slot with girls that aren't max level), same goes for the solo events as well etc. Not sure if it makes sense but I think it will cut down time when the bot has less actions to take.

Also just now the program randomly stopped. I exited without thinking before looking at the log lol. But I'm guessing, if my internet suddenly gets off, will it shutdown itself? Because I do have a bit of a problem with my internet. Or is there other ways of it stopping it self? I did see a line saying it shutdown. The window itself did not close if that what you were thinking.
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
What if I just want to enhance only equiped weapons. I don't really want to waste materials on enhancing weapons I dont use.
MEGA links have been updated. To update the version for such a small addition, it will suffice if you delete the "lib" directory and replace it with the "lib" directory from the new zip archive.

You can now add "equipped" attribute to the "equipmentMatcher" element, as shown below:
XML:
<equipmentControl equipmentType="weapon">
        <enhancer targetSkillLevel="10" targetBonus="10">
            <baseQuery distinctionLevel="1">
                <equipmentMatcher enhanceMaterial="false" minRarity="SSR" equipped="true"/>
            </baseQuery>
            <matsQuery>
                <equipmentMatcher maxRarity="SR"/>
            </matsQuery>
        </enhancer>
    </equipmentControl>
 
  • Like
Reactions: MadDany

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
An idea

Instead of bunching up all the actions. Separate them into only 1 scripts each so that we wont waste time or AP or BP. When union events comes, then use a script that only does union raids and nothing else. And a script that only does cave of gold ore (For xp grinding, tho i'm not sure if you are able to make it choose which party to get, i do have a part slot with girls that aren't max level), same goes for the solo events as well etc. Not sure if it makes sense but I think it will cut down time when the bot has less actions to take.
Yeah. The idea for splitting configuration into multiple files is based on my belief, that it's more approachable when there are only two files, but I can see your point. For know I am not going to change it, but you can keep such different configuration files for yourself, for example in some subdirectory (subfolder).

Also, there is no quest-search-strategy for union-event quests yet. I will try to implement it next weekend when such event becomes available, so stay tuned.

The idea for enabling configurability of party selection is something that's indeed doable. In fact, it should not be challenging to add it. Perhaps I will do it at some point, but it will require some testing. For now, this logic is hardcoded and it selects first party that has a job with an element type (weapon's element type) matching the recommended element type for the quest. Defaults to party a, if not found.

Also just now the program randomly stopped. I exited without thinking before looking at the log lol. But I'm guessing, if my internet suddenly gets off, will it shutdown itself? Because I do have a bit of a problem with my internet. Or is there other ways of it stopping it self? I did see a line saying it shutdown. The window itself did not close if that what you were thinking.
Yes. If your internet has stopped then bot will fail and shutdown. There is a lot of things that can cause the application to fail. But if there are no errors, it generally will not shutdown, but run infinitely.
 

MadDany

Member
Jul 9, 2017
317
385
I think I found a problem. After not finding a raid and doing all its other activities it restarts after waiting a certain time right? It wont find any other raids anymore. And knowing right now its a union event and I checked it at a time where most people are active, I would highly doubt its because there are no raids up. And yes I do have extra bp. Had it at 90. Unless it isn't configured to use more than 5 each time?
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Well... from your description I am not sure I quite understand what is not right. Hopefully I will figure it out myself soon enough. :)

I know there was one issue with this bugged quest that I made yesterday. Not going into details, this bugged quest will disappear tomorrow, so the buggy behaviour you see might also disappear tomorrow. If not, then poke me here again :)

The logic I have implemented for `union_raid_event_battle` is to always play at most 1 union raid battle. If you lose one such battle, it will wait for `onLostSearchTimeoutSeconds` and then it will run again, check if the battle has been finished. If no, and your battle is still ongoing, it will wait again for that same amount. Otherwise it will join a new matched battle.

Not sure if we want more configurability for this :)
 

MadDany

Member
Jul 9, 2017
317
385
Now that there is an official discord, I fear that the Kamihime devs might find out about this in the near future lol. People can easily talk to them now so there is a good chance it will happen.
 

DarkEnforcer

New Member
Dec 9, 2019
4
0
@Kurweta

I really like this app. I found it very useful and well made and I have been using the Stakhan 1.0.0 quite extensively for KH.
I had been toying around with the kh.quests.xml file, however, I could not find a way for it to run the Raid Quests. I am referring to the normal raid quests which has a limit of 3 runs per day per quest.
Any advice?
Thanks.
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Hello DarkEnforcer and thank You for a kind word.

TL,DR; there is no such option for it. I would have to create it.

The way this is implemented, is that the "PlayQuest" activity has different quest search strategies. There are various strategies implemented, inluding "raid request", "raid event", "advent quest". The strategy's main responsibility is to find a quest to be played, but it also has to define how to act when no quest can be found, defining the next search.

Implementing a new strategy to enable running raid quests is simple and I can add it pretty fast. I will try to do it sometime next week and upload new version. :)
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
It's done. New version is downloadable from the mega folder linked in the opening post.

You should now see a new element in the default configuration:

XML:
<playQuest displayName="raid_quests">
    <raidQuestSearchStrategy>
        <questMatcher maxCost="25" cleared="false"/>
        <questMatcher maxCost="25"/>
    </raidQuestSearchStrategy>
    <recoveryManager halfElixirs="0" elixirs="0"/>
    <basicBattleStrategy raidLeechSeconds="600"/>
    <alwaysContinuationStrategy/>
</playQuest>
To upgrade your version it sufficies to extract the distribution.zip on top of your current stakhan folder. This will override older files with newer versions and should keep your current configuration intact.

At last, I haven't had much time for testing, so if you spot some bugs, let me know.
 
  • Like
Reactions: MadDany

DarkEnforcer

New Member
Dec 9, 2019
4
0
Thanks. I will try it now.
On a side note, is it possible for you to provide the source? I think its in the Git Bundle but I had trouble opening it. Is it possible to have it in a zip or tar?
 

Kurweta

Newbie
Donor
Sep 24, 2017
73
66
Well, it is possible, however, I am already making this bundle and it's much easier for me to make a bundle as I don't need to set up anything more. There are also some other reasons why bundle should be better.

Assuming you have git installed, the following command will extract the source code from bundle to a new folder 'stakhan' in your current directory:
Code:
git clone -b master /path/to/stakhan.bundle
For more details on how to build stakhan and how it works internally, please refer to the developer-guide in the doc folder. :)