[1.0] Common Sense - basic AI tweaks

Started by avilmask, March 20, 2019, 10:41:51 AM

Previous topic - Next topic

Chibisuke

Quote from: avilmask on March 29, 2019, 04:24:16 PM
Figured source of the problem, fixed it (1.1.4b).
I had to make a not ideal solution.
Problem is, there is some sources of washing that do not make a pawn completely clean (washing at a well or in open water, it maxes out at 0.69). But priority logic was "hm, I'm on free time and I'm not very clean (below 0.8 ). I should take a bath while I have a free time". Then jobgiver tries to finds something suitable, goes through bathes, then basins, finds nothing (close enough), and tries to find ANYTHING globally, gives a job that maxes out at 0.69. It's done immediately, and pawn comes bake to a priority loop. I could add an additional global scan operation to the ticker... But it's a bad idea for a whole lot of (performance) reasons. So I've just reduced required need level to 0.55 (what's awfully close to original number when sleep need is above 0.95). Not perfect... But better, than nothing, I guess?

Maybe sometime later I'll just add an additional variable to the "Need_Hygiene", that could tell "we should target for a lower number", using which pawn would be able to adjust priority checker after first job.

nice.. i didnt even realise it was because of this mod.. i just had a pawn stand at the basin/well washing up non stop. Basin would run out of water with him one washing session...:D...just 1 thing.. when i unstick the haul to stockpile for job bill..it doesnt seem to save and is back to being ticked when I next reload the game.

Canute

I got another idea for an AI tweak.
Some range/zone check for animal handler.
The pawn just wanted to train a hauling animal, the animal is faster then the pawn so the pawn followed the animal to the other side of the map and back.
Since i can't figuring out a good range/zone check that would prevent such a situation.
Why not let the animal pause the current task when the pawn start the movement to the animal. Obedience training ofcouse need to be done first.

whyareuhere

Hi, I got an issue with the activation of an AI (listed as a crafting task) where the colonist is supposed to haul the materials to the deactivated AI.

The colonist picks up the materials, but the dev mode cites an issue with the colonist's job driver manager and she ends up hauling the materials to the stockpile. I'll try to recreate it later to give the actual error code.

avilmask

I'm back from vocation, so I'll be fixing things soon.

Quote from: whyareuhere on April 26, 2019, 02:16:42 PM
Hi, I got an issue with the activation of an AI (listed as a crafting task) where the colonist is supposed to haul the materials to the deactivated AI.

The colonist picks up the materials, but the dev mode cites an issue with the colonist's job driver manager and she ends up hauling the materials to the stockpile. I'll try to recreate it later to give the actual error code.
It would be cool if you added at least a log message.
I had a report like that there, so kinda known issue. But so far all I know is some conflict with another mod I don't know about. At least, I have screenshots of a modlist that was used  :-\

avilmask

- fixed a problem with options not saving their enabled/disabled state.

Quote from: Roolo on April 10, 2019, 07:28:52 AM
I'm the author of Giddy-up. Are you sure this is an actual issue, and not just a feature?
It throws errors, and animal doesn't get out from this state without drafting (mind-controling) them. So, yeah.

Quote from: Canute on April 20, 2019, 03:38:28 AM
The pawn just wanted to train a hauling animal, the animal is faster then the pawn so the pawn followed the animal to the other side of the map and back.
Better solution for this is to stop animal and force it to wait instead :)

Chibisuke


Quote from: Canute on April 20, 2019, 03:38:28 AM
The pawn just wanted to train a hauling animal, the animal is faster then the pawn so the pawn followed the animal to the other side of the map and back.
Better solution for this is to stop animal and force it to wait instead :)
Please do :D on regular speed animals they normally catch up n have enough time to stop the animal. On some modded animal poor pawn is chasing the animal around the whole map n ignoring all other needs. This also kind of happens with Hospitality, where the pawn tries to interact with visitors who are helping with hauling and they chase the visitors around trying to interact. But it seems the jobgiver task for interacting is slower than the visitor pawn job designation for picking up n hauling, so they run off before the interaction can occur.

avilmask

About pawn keeping to pick up items into their inventory endlessly. It seems there was an issue with deep storage + pick up & haul combo, and it affected common sense as a side effect. So, it may be a solution, if you have trouble with it.

Sonsalt

Cheers, your mod is amazing, but it appears to have compatibility issues with Hospitality https://steamcommunity.com/sharedfiles/filedetails/?id=753498552&searchtext=Hospitality

Muffin did not get a relax job.
Verse.Log:Error(String, Boolean)
Verse.Log:ErrorOnce(String, Int32, Boolean)
Hospitality.JobGiver_Relax:TryGiveJob(Pawn)
Verse.AI.ThinkNode_JobGiver:TryIssueJobPackage_Patch2(Object, Pawn, JobIssueParams)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Hospitality.ThinkNode_FilterGuestRooms:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
RimWorld.ThinkNode_Duty:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Conditional:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Tagger:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Subtree:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
RimWorld.ThinkNode_JoinVoluntarilyJoinableLord:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob_Patch4(Object, ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:EndCurrentJob_Patch2(Object, JobCondition, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick_Patch2(Object)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
ZombieLand.Verse_TickManager_TickManagerUpdate_Patch:SingleTick(TickManager, Int32)
Verse.TickManager:TickManagerUpdate_Patch1(Object)
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


This is just one of the issues I noticed. Guests seem to have quite some problems with this mods

Canute

Since awhile i allways use common sense at my default modset together with Hospitality.
And never encounter such an error.
Since the error is about relax, do you use mod's that add new (special) recreation stuff ?
Maybe post the link you made with the "Share logs" button, that include the modlist.

BladeOfSharpness

Here is a common sense suggestion: don't unload stuff in the reverse order they were picked up, but (not I'm not asking to solve the travelling salesman problem) by dropping to the nearest stockpile stuff.

Canute

I think you speak in combination with Pickup&haul so pawn's got alot of stuff at their inventory.
It allready would help, if the stuff at the inventory would stack or be sorted.

BladeOfSharpness

Ah yes right, I forget that a few out there are not using this mod. Oh the joy of seeing your pawn moves 150 tiles to grab a smokeleaf joint and then do another trip to pick-up an adjacent meal.

Grabarz

#42
Quote from: whyareuhere on April 26, 2019, 02:16:42 PM
Hi, I got an issue with the activation of an AI (listed as a crafting task) where the colonist is supposed to haul the materials to the deactivated AI.

The colonist picks up the materials, but the dev mode cites an issue with the colonist's job driver manager and she ends up hauling the materials to the stockpile. I'll try to recreate it later to give the actual error code.
[/b]

It would be cool if you added at least a log message.
I had a report like that there, so kinda known issue. But so far all I know is some conflict with another mod I don't know about. At least, I have screenshots of a modlist that was used  :-\


I got similar problem with Infinite Storage mod - colonist is taking resource and it should be delivered to workbench instead however colonist is moving back and forward near storage picking and dropping same resource forever in endless loop

Exception ticking Redhead (at (117, 0, 65)): System.NullReferenceException: Object reference not set to an instance of an object
at (wrapper dynamic-method) Verse.AI.Pawn_JobTracker.StartJob_Patch1 (object,Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool) <0x00d03>
at Verse.AI.Pawn_JobTracker.TryFindAndStartJob () <0x00245>
at (wrapper dynamic-method) Verse.AI.Pawn_JobTracker.EndCurrentJob_Patch2 (object,Verse.AI.JobCondition,bool) <0x004e5>
at (wrapper dynamic-method) Verse.AI.Pawn_JobTracker.StartJob_Patch1 (object,Verse.AI.Job,Verse.AI.JobCondition,Verse.AI.ThinkNode,bool,bool,Verse.ThinkTreeDef,System.Nullable`1<Verse.AI.JobTag>,bool) <0x00db3>
at Verse.AI.Pawn_JobTracker.TryFindAndStartJob () <0x00245>
at Verse.AI.Pawn_JobTracker.JobTrackerTick () <0x00406>
at (wrapper dynamic-method) Verse.Pawn.Tick_Patch1 (object) <0x001f3>
at Verse.TickList.Tick () <0x00487>

Verse.Log:Error(String, Boolean)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Sonsalt

This mod appears to have compatibility issues with the Hospitality.

It causes guests to just stand around and do nothing.

Canute

I don't think so.
I used many times both mod's and never got such a problem. So another mod must interfer too.
Do you have any error's at the logwindow ?