Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Strive: Conquest

A successor to first Strive For Power game, currently at alpha stage · By Strive4Power

Mod: Automatic Tool Equip (ATE)

A topic by Turtle Hell created 25 days ago Views: 1,372 Replies: 9
Viewing posts 1 to 5
(+1)

Automatic Tool Assignment for Tasks

Introduction

This quality-of-life mod automatically equips characters with a suitable tool whenever you assign them a task, removing the need to change their equipment through the inventory.

Behavior 

  • When the user assigns a task to a character, that character is also equipped with the best available tool for that job.
    • The efficiency stat is used to rank available tools and select the best one. Critical chance is used as a tie-breaker.
    • Only tools in the mansion's inventory are considered.
  • When a task is assigned to multiple characters, the order in which characters are selected determines which character gets the best tool.
  • Characters will unequip their tool - if any - when they are assigned a task that does not require one.
    • This only triggers with player input. Events that change the character's task automatically (e.g., the transition to "Rest" after travelling or depleting a dungeon's resources) will result in the character retaining their tools.

Disclaimer

This mod is in the early stages of development and has undergone limited testing. Make sure to backup your save files before installing it, and please report any bugs or other problems you experience. In that way, you can help make this mod better for yourself and everyone.

Download

Initial Release (tested with Strive: Conquest 0.8.5a)

Installation

Add the folder "AutoToolEquip" to your mods folder, then enable the mod through the game menu. You can find detailed, step-by-step instructions in the README.txt file provided.

Compatibility

This mod has only been tested for compatibility with Functional Chastity Devices (S2Ch). It should be compatible with almost any mod, as it only modifies the job selection GUI, but you should still make a backup of your save files before installing it.

For Modders

Feel free to study, copy, reproduce, and redistribute any of the code in this mod! It's been heavily commented to make it easier to follow. I cannot guarantee it will be good code (or bug free), but hopefully you'll still find it to be helpful. Attribution and/or credit is appreciated, but not required.

I could not assign any collection tasks with this mod on.  Maybe just incompatibility with Conquest tweaks, will test it out.

Please do! Conquest Tweaks has caused issues in the past, so it would be my first guess too. Possibly the service job income module.

If you can't find the issue, I'd appreciate it if you could share your game log with me - either by copying the text here or sharing the file. You can find your logs in the same place as the "mods" folder, and the most recent one should be "godot.txt".

And of course: many thanks for taking the time to report this issue!

Pro tip: if you decide to share the log here, try formatting it as "Code" with the top-left button in the text box. It makes it a lot easier to read =)

Disabling that module did not help, I even tried with only this mod enabled but no luck. I did remember that I was able to harvest in the first dungeon that I cleared when I had no tools, so I sold all my fishing tools and I was able to assign some to the fishing job.  

(1 edit)

Alright. Then my best guess is that the ranking process for tools is encountering an error and aborting, which cancels the job assignment process. Are you using a campaign file imported from an earlier version of the game?

Also, if you could share your game log it would be really helpful. Any errors encountered should be reflected in the log, which helps me narrow down the issue.

Sorry I took so long to respond.  I started a new game with auto tool only, bought a fishing tool and tried to assign my character to the job. This is what the log had to say. 

Game Version: 0.7.0

OS: Windows

Generating portrait attribute cache took 0 minutes and 2 seconds.

Mod Loader: 4.0

Automatic Tool Equip

warn - race selection not valid

warn - race selection not valid

warn - race selection not valid

SCRIPT ERROR: Invalid call. Nonexistent function 'clone' in base 'Reference (ItemClass.gd)'.

   at: select_job (<built-in>:60) - Invalid call. Nonexistent function 'clone' in base 'Reference (ItemClass.gd)'.

SCRIPT ERROR: Invalid call. Nonexistent function 'clone' in base 'Reference (ItemClass.gd)'.

   at: select_job (<built-in>:60) - Invalid call. Nonexistent function 'clone' in base 'Reference (ItemClass.gd)'.

Youare using a very old version of the game. The current version is 8.5b. There have been recent changes to crafting.

(2 edits)

The mod is trying to access non-existent code while adding the tool to the character's inventory. The game's item management logic was changed at some point during development, and your game version probably predates that.

I'm afraid that updating your game is likely your only real option in this case, unless you're willing to tinker with the code in this mod to get it to use the old process. If you are, I'd suggest consulting the "useitem" function in the "InventoryListModule" as it shows how gear is equipped on characters.

If you choose to update your game instead, be aware that Conquest Tweaks is not fully compatible with the modern version of Strive: Conquest. You will have to disable some of its modules.

My apologies that I could not help you further.

(+1)

I'm not versed in coding nor the creation of mods, but just curious if it'd be easier to just auto-unlock the mansion upgrade which negates tool specificity. Might that possibly even make it less likely to cause problems with older game versions?

Sounds like the player wouldn't have to bother un-equipping tools for the mod behavior to take effect this way too.

(+1)

Unlocking the mansion upgrade ought to be simple enough, but the effect it provides covers only dungeons and one-time tasks. For those who gather resources from the mansion and villages instead, the upgrade does not truly support their use case - especially in the early game, as workers are constantly shuffled around.

Admittedly, I also dislike the upgrade at a conceptual level: it eliminates the need to build and manage different kinds of tools, deciding where to invest your limited resources to gain the most benefit. In terms of role play, I also prefer the idea of "stocking the workshop" and letting my workers choose their tools themselves, as opposed to creating a universal multi tool for everyone to use.