Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 18 19 [20] 21 22 ... 24

Author Topic: Crown of Conquest - Browser RPG - now with improved automation  (Read 34122 times)

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #285 on: August 31, 2015, 03:59:32 am »

I've dropped a couple of unfortified garrisons near Ashford, as an interim measure (I just hired another ~16 characters, since the micro's gone down a lot) until I have time to do something more complicated - like infiltrate The Bloody Baronies. If there's anything specific useful I should do with the garrisons instead (they're currently filled with level ~19 characters), I'm open to ideas.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #286 on: August 31, 2015, 08:42:09 am »

Well you can put them into the spare castles. The one @ 85,83 and ... it turns out that Zazmio's one at 84,72 is now vacant, and both a very close to your ones, so good timing overall. Both of them have level 10 barracks so you can start leveling up quickly. the rest of Zazmio's garrisons are fine, and he hasn't logged in in a long time, so you should occupy those two locations, because a random player took them over, so we want to prevent that.
« Last Edit: August 31, 2015, 08:49:42 am by Reelya »
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #287 on: September 01, 2015, 01:03:08 am »

ok, small bump. First, garrison gold is now auto-collected, the same as I got it working with towns. So you can just walk over your garrisons and it will collect.

Second, I added spells to the leveling code, so you change all your characters spells whenever you want. This is a big deal for me since I almost never get around to maxing out my characters spells since it's so fiddly. This ensures the correct spells are set to auto-cast, and that the auto-cast percentages are all 100%

It's a similar deal to the other ones but works on a percentage system since you can change your spells whenever you want. Here's the deal on the new functionality.

Spoiler (click to show/hide)
~~~

http://jgame.net.au/kingdoms/crownofconquest.user.js
« Last Edit: September 01, 2015, 01:08:10 am by Reelya »
Logged

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #288 on: September 01, 2015, 05:20:19 am »

This is absolutely fantastic, and I applaud your effort, (here's the 'but') but the button seems to have disappeared...?

I did a little source code comparing to see if I could find the issue, but the previous version (which worked) doesn't seem any different in the obviously relevant spots, although I don't have the full understanding of your code needed to properly debug it quickly.

I did notice that you seem to have accidentally duplicated the code for the stat_names etc. arrays, though, FWIW.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #289 on: September 01, 2015, 05:27:08 am »

I might have made a mistake when I cut out my personal data, let me check (I have my own settings and then the "vanilla" part commented out so i don't have to re-edit it every time.

EDIT: no, there are meant to be two sections with the stat names. Notice how the first set have a word and a colon then a number, those map the word to the number, so that you can write "stat.con" instead of a number. the other ones later are in double-quotes, so they're the actual text of the names.

If you hit ctrl-shift-J on FireFox you can bring up the error log, under the Javascript tab you should see reports about what line caused the error.
« Last Edit: September 01, 2015, 05:32:54 am by Reelya »
Logged

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #290 on: September 01, 2015, 05:32:17 am »

EDIT: no, there are meant to be two sections with the stat names. Notice how the first set have a word and a colon then a number, those map the word to the number, so that you can write "stat.con" instead of a number. the other ones later are in double-quotes, so they're the actual text of the names.

Oh, right. I need to strengthen my js-fu.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #291 on: September 01, 2015, 05:37:05 am »

Are you on Firefox or Chrome btw. Play around with Ctrl-Shift-J. That definitely works to report any errors in the script on Firefox. it brings up the console in Chrome too but I'm not sure if that's the right place to look.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #292 on: September 01, 2015, 05:42:29 am »

Aha, I accidentally cut a part out when I was copy-pasting settings. The console (Firefox) worked, thanks.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #293 on: September 01, 2015, 05:49:54 am »

I'm seriously thinking about implementing A* pathfinding in the script. Since all the tiles have embedded move costs in the browser data, it should be possible to do pathfinding to a non-adjacent tile, then save the coordinates of that tile, and make a basic "walk" feature where you don't have to click every single tile along the way, and it also uses shortest-path. I'd be using the trick I used to make the level-up button and attach every non-adjacent tile to my own code.

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #294 on: September 01, 2015, 09:51:54 am »

Bump: tedium reduction v1.22

I have basic automated movement across the map now. You need to wait for a second, then the regular mouse cursor will become a hand for further away tiles. Click a tile and let it go, though it currently just plows straight through the terrain (no problem if you have a good movement rate). The movement rate is currently not very smooth, but it definitely beats sitting there clicking if you have to travel a fair distance.

It's not perfect yet but it's servicable. It needs a "stop!" button, but reloading the page cancels it already, and it doesn't do any special action if there's a battle, and I haven't had enough chances to test what would work.

http://jgame.net.au/kingdoms/crownofconquest.user.js
« Last Edit: September 02, 2015, 12:35:59 am by Reelya »
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Dungeoncrawler and Warfare Browser MMO
« Reply #295 on: September 01, 2015, 09:19:54 pm »

Ok walking code is working a treat now. You can click further-away tiles and it will keep walking there, and I've synced it nicely with the page loads. I'm trying it right now with my broswer in another tab, it kept walking while I typed. It also waits nicely for battles to be resolved (the first version of walking caused issues). Sometimes the tiles weren't clickable in the previous versions of this function, but I think I licked all the bugs and issues.

For longer-distance walking, use the mini-map to move to where you want to go, click once, then recenter on your party and take just one step. The automatic walking then kicks in. If you make a mistake, currently reload the page will clear the automatic system. I'll make a cancel button later, and I also plan to make it try and dodge high move cost tiles.

I'll just have to check that the code doesn't do anything retarded with dungeon movement. Hopefully it won't affect it.
« Last Edit: September 01, 2015, 09:30:53 pm by Reelya »
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Browser RPG - now with improved automation
« Reply #296 on: September 02, 2015, 08:01:25 am »

Bump - new script feature - "Retarget" button automatically targets every character at a single enemy. A handy feature for both newbies and high level players, takes some tedium out of dungeons whilst giving you a decisive edge in tough battles.

Focusing attacks means you take less hits back from enemies, saving time on casting healing spells, and meaning you can survive longer in dungeons. But it normally takes excessive amounts of clicking to retarget everyone constantly during a battle, so you'd only use it on really tough fights. But the new "Retarget" button reduces that to a single-click per each enemy, so you have no reason not to use it in every battle.

~~~

Next up, I just discovered, after doing the above improvement that there did turn out to be some bugs regarding the "walk" system and dungeons. When you leave the dungeon it decides that clicks issued inside the dungeon were "walk" commands and starts walking off god-knows-where once you leave the dungeon! A page-reload stops it, but I need to work out how to prevent it in the first place.

After that, I'm going to improve the targeting system, but putting a link on each of the monster portraits. Clicking their portrait will allow you to auto-target everyone on that monster, but I'll leave a generic "Retarget" button too, since sometimes the game is slow or fails to load monster portraits and we don't want to have to wait for that bullshit or reload the page just for that.

Finally, doing the targetting system got me looking at what is the holy grail for me - automatic mass healing spells! I'm thinking that it'd be a one-button push and heal up everyone to within some distance of their maximum HP. I want to do it this way to minimize "overflow" when healing is wasted by going over the maximum. On difficult dungeon raids often healing is the limiting factor, so it needs to be used as efficiently as possible.

Ok with those two changes dungeons might actually become fun again. Retargeting during battles and long sessions of spamming healing spells were the two things that stopped me from taking on the top-level dungeons and getting all the cool exclusive loot they offer.
« Last Edit: September 02, 2015, 08:25:06 am by Reelya »
Logged

morlicar

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Browser RPG - now with improved automation
« Reply #297 on: September 02, 2015, 06:48:31 pm »

I like the changes you've made, but I noticed an odd issue with the movement mod.  If I'm in a town and click an adjacent tile, the party will move the one tile, then move back and reenter the city.

It does not seem to do this if I click 2 or more tiles away.

Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Browser RPG - now with improved automation
« Reply #298 on: September 02, 2015, 08:04:15 pm »

I'll double-check how things are working, because if you click one square away the code should not kick in, it has a distance check.

EDIT: I think I worked out the issue. It happens when you move to a city with the auto-movement, then move out of a city normally. When ending on a city, the movement target isn't deleted the same as when you end on a wilderness tile, so when leaving the city again, it still has a "move to the city" command stored somewhere in there. The way to fix that is to put an extra check in the per-second code that checks if your location changes (which updates you on the map), and delete any movement command that might be lingering.

EDIT2: I fixed the bug you discovered morlicar, thanks for bringing that up, and also fixed the problem where false moves were generated in dungeons. It now ignores clicks inside dungeons and city raids. I also made it so you can only click the Retarget button once, and it will ignore clicks until all existing characters have been retargetted. Gonna overhaul the retarget system eventually though.

If you discover any more issues, please let me know.
« Last Edit: September 02, 2015, 08:59:38 pm by Reelya »
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Crown of Conquest - Browser RPG - now with ever-more improved automation
« Reply #299 on: September 03, 2015, 08:29:17 am »

bump, even more features, to make dungeon delving actually fun again! No more endless spamming of heal spells! One-click battles!

"Auto Heal" button. Click this and it will start sending heal spell requests until everyone is full or you're out of spells You get a variable called "healMargin" to tell it how close to full you want to get it. This is to prevent healing over 100% (to get the most out of your heals). I set that to 20hp as a default. Now you can just click "Auto Heal" after a big battle, and you don't have to worry so much about healing during battles (which means you end up taking down enemies faster and take less damage overall in the long run ). Healing between fights doesn't count as an action, so it makes the most of your turns, too.

"Auto Combat" toggle button, can be set to Off, Round or Full settings. If you set it to off, nothing special happens: you can click Retarget, then customize the actions for a few guys before you attack. If you set it to "Round" then every time you click Retarget, it sends the Fight command so you only have to click once per round. If you set it to Full, then the game will automatically call retarget every round and click Fight for you automatically. You might need to click Retarget just once if you turn on automation during a battle. Basically, the last setting means you only click once per battle, and the game singles out each enemy one at a time for extermination. So it's one-click optimal combat.

Just make sure you know what you're getting into with the Auto-Combat and be ready to toggle it off if things look bad ... It's great though if you have a killer party and are just grinding dungeons monsters that have no chance against you.

~~~

With this round of automation, I'm probably running out of good ideas for things to add. I got my holy grail of automatic healing working fine and actually delved a dungeon without feeling shitty!

Things to-do would basically be optimizing the existing features now - doing the terrain move-cost calculations for the auto-move, which would save turns, and speeding up the auto-heal (it sends 1 heal request at a time, then checks how much was healed, but I could send 8 heal requests at once, basically doing the server requests in parallel for each character that needs healing). Another thing I want to add is that when you have Autocombat turned on, then the "walk" feature would stop if you land in a square with monsters, so you have the opportunity to fight them.

I might also play around with another AutoCombat setting "heal" which automatically starts the healing script after each battle. I'd want to ensure that it doesn't slow down play before using that. And the autoheal should report how many heal spells are left each time (save you from having to check).
« Last Edit: September 03, 2015, 08:42:20 am by Reelya »
Logged
Pages: 1 ... 18 19 [20] 21 22 ... 24