[1.1] Misc. Robots++

Started by alaestor, September 16, 2016, 12:08:58 AM

Previous topic - Next topic

HanFox

@Lennbolt7, I added this to an existing colony yesterday and it worked fine.

Are you sure you actually unpacked the zip? Do you have a "Robots_PlusPlus_Misc_Robots_Xtension" folder with About, Defs, Textures and "Misc Robots Plus Plus.txt"?

If you installed it via the Steam Workshop try it manually instead.

Lennbolt7

Well as it turns out unpacking it wasn't enough. There's four more zips in the unpacked file that have the folder you describe. I'll put in the a16 version and post the results in an edit tomorrow.

masterpain

Is there an easier way to prevent hauler bots from running in the middle of battle?  Like restrictions?

Canute

No, auto. they don't want do this and i don't know a mod which change the flee range to 20/30 before they even come at range.
Equip your bot with some pers. shields (but drop the own energy field first) to protect against some bullets.
If you got equipment with speed bonus, give it to the hauler too.

But just ask yourself, what are you doing when you encounter a raid ?
- draft all pawns. seperate them by fighter and crater and move the crafter at safe area.
- assign animals to a safe indoor area if they arn't allready are.
- turn off all non fighter bots.

Maybe try "better pawn control" mod, then you just set the policy to raid (you need to define it first ofcourse) and all these things happen more or less with just 2 clicks.

Lennbolt7


alaestor

#110
Quote from: Lennbolt7 on January 24, 2017, 02:12:11 AM
Well as it turns out unpacking it wasn't enough. There's four more zips in the unpacked file that have the folder you describe. I'll put in the a16 version and post the results in an edit tomorrow.
Quote from: Lennbolt7 on January 24, 2017, 08:00:17 PM
It works now, thanks.

LOL sorry, I only read this periodically so I'm not active enough to reply to things in a timely fashion...
I think you downloaded the entire folder linked on mega.nz -- the link actually provides multiple .zip files (for various versions) and you're supposed to download the appropriate one. Conveniently (or rather inconveniently...) mega also includes a button to download the entire folder as an archive... It can be annoying when small confusions like this get in the way of stuff working like you'd expect. Sorry you had that mix-up.

Quote from: masterpain on January 24, 2017, 11:00:52 AM
Is there an easier way to prevent hauler bots from running in the middle of battle?  Like restrictions?
In the OP there's a quote and link to haplo talking about allowable areas. I think it may still be applicable.


Quote from: HanFox on January 24, 2017, 01:48:31 AM
[...]Do you have a "Robots_PlusPlus_Misc_Robots_Xtension" folder with About, Defs, Textures and "Misc Robots Plus Plus.txt"?[...]
Random note for the record and for those who are curious: the "Misc Robots Plus Plus.txt" file is optional and exists to aid in (windows) search index and (linux) grep results. Just contains keywords / variations on the title of the mod. More applicable for the steam release, as it will be filed in a folder structure like "./12351451/25636345/" and can be annoying to find.

kroclebo

Hello, and thanks for this great mod. I have one question : how can we make the crafter bot able to craft medicine and such ? (At the drug lab, some recipe need medicine skills...
Thanks.

alaestor

#112
Quote from: kroclebo on February 01, 2017, 09:37:56 AM
Hello, and thanks for this great mod. I have one question : how can we make the crafter bot able to craft medicine and such ? (At the drug lab, some recipe need medicine skills...  Thanks.

IF YOU'RE NOT A MODDER
dunno, I probably should have looked into that earlier, but I dont think i'll be changing it any time soon... sorry man

IF YOU'RE A MODDER
welp im lazy and dont know anything about current documentation or how one would set medical level without enabling the bot to do medicine.
in /Defs/ThingDefs/RPP_Races.xml you will find definitions for each tier and type of robot.

You'll see stuff like this;

<!-- Advanced -->
<ThingDef Class="AIRobot.ThingDef_AIRobot" ParentName="BaseAIRobot">
<defName>RPP_Bot_Crafter_Adv</defName>
<label>Crafter Bot</label>
<description>A Tier 3 Master-class unit capable of smithing, tailoring, and crafting.</description>

<!-- ... Bunch of stuff i cut out ... -->

<passionLevel>0</passionLevel>
<startingSkillLevel>13</startingSkillLevel>
<enhancedAI>false</enhancedAI>
<workTag>1032</workTag>
<workTypeDefs>
<li>Smithing</li>
<li>Tailoring</li>
<li>Crafting</li>
</workTypeDefs>
</ThingDef>


the thing to focus on for your question is to modify the <workTag> and maybe the <workTypeDefs> fields to allow it to make drugs and have a medical level. Old <workTag> information can be found here, and they've probably added new ones for the drugs and whatnot. (Note that workTag's value appears to be using powers of 2 to set binary level flags). You will need to include drug-making worktype as an <li> under <workTypeDefs> as well to allow it to use the table and make drugs (if it doesn't already)...

I'm pretty out of the loop. I dont play much / at all, and I'm not too sure if there's a resource somewhere that documents the worktypedefs and worktags... I'll probably make drug making and the like a standard feature in future updates for the crafter bot either whenever I get around to it (likely after a game update) or if someone like you finds the appropriate information.

Addhatic

Ok this is driving me nuts.
i tried making the ER bots capable of crafting medicine. at first just added on RPP_Races.xml <workTypeDefs>
<li>Doctor</li>
<li>Crafting</li>
<li>Firefighter</li>
</workTypeDefs>

But it didn't work. so i searched the forums and found you have to add worktag number, so after messing around a while the code became like this <workTag>5288</workTag>
<workTypeDefs>
<li>Doctor</li>
<li>Crafting</li>
<li>Firefighter</li>
</workTypeDefs>

Here i should mention that everything else is the same as before. but in game ER Bot shows that it is still icapable of crafting. and when i try to make the ER Bot to produce  medicine by right clicking the Drug table, shows skill too low. so what am i missing here ??
Is the bot hardcoded to be incapable of something ? then where is the Code ? i searched all the xml Files but didn't find any..

Plz Help. Thanks in advance.

alaestor

#114
Quote from: Addhatic on February 02, 2017, 09:51:05 AM
But it didn't work. so i searched the forums and found you have to add worktag number, so after messing around a while the code became like this <workTag>5288</workTag>
<workTypeDefs>
<li>Doctor</li>
<li>Crafting</li>
<li>Firefighter</li>
</workTypeDefs>

Here i should mention that everything else is the same as before. but in game ER Bot shows that it is still icapable of crafting. and when i try to make the ER Bot to produce  medicine by right clicking the Drug table, shows skill too low. so what am i missing here ??
Is the bot hardcoded to be incapable of something ? then where is the Code ? i searched all the xml Files but didn't find any..

Plz Help. Thanks in advance.
So the workTags are boolean bit-field flags that set state for pawns; saying what they are allowed or not allowed to do... To figure out what information you need; we'll need to find documentation for the workTypeDefs and workTag fields (enums in some C# source code I think), or look at some stuff in /mods/core/ to see what definitions they're using to allow working at the drug table.

in "Mods\Core\Defs\WorkTypeDefs\WorkTypes.xml" the workTypeDefs are defined, and as such it appears the only relevant one for the drug table is probably <li>Crafting</li> which you've already added.

Now for the workTags (unless new ones have been added... I cant find where they're defined) Intellectual(2), ManualDumb(4), ManualSkilled(8), Crafting(1024) are the only tags that I think can be relevant for crafting drugs. If you're doing this on the ER bot you'll also need to add Firefighting(4096) which means the total is 2 +4 +8 +1,024 +4,096 = 5,134 <workTag>5134</workTag> if that works try with 5132 instead, as I suspect Intellectual(2) is unneeded.

Edit: everything I say is wrong...
(I wish this dang thing had some centralized documentation... Maybe it does and I'm just blind.)

Addhatic

@alaestor
Tried your worktag number, Didn't work. see attachment for debug log.
I came up with 5288 after following this (taking from worktype.xml)

Firefighting+Doctor+Crafting
=(Firefighting+Scary)+(Caring)+(Crafting+ManualSkilled)
=4096+128+32+1024+8
=5288

Thanks for the reply.

[attachment deleted by admin due to age]

alaestor

#116
Quote from: Addhatic on February 02, 2017, 01:00:04 PM
I came up with 5288 after following this (taking from worktype.xml)

Firefighting+Doctor+Crafting=(Firefighting+Scary)+(Caring)+(Crafting+ManualSkilled)=4096+128+32+1024+8=5288

Errr "caring" is medical stuff? Lol I'm clearly lost as I don't remember what anything means any more...

If the workTag and workTypeDefs have all the things that would make sense, then I don't know what could be stopping it from crafting at the drug table.

For a screw-it attempt, try adding everything to the workTag just to make sure it doesnt need intellectual or dumb labor or something stupid.

Dagoras

Hey alaestor,

i really like your robots, they make things much easier, but i have a question.

Since i prefer robots over that fleshy animals, i would like to have a caravan bot, i mean there is that basic hauler bot and i wondered why you cant use it in caravan`s ? I know they need to recharge, but my question is can you create a caravan bot or maybe atleast can show me how i could add that function to the basic hauler bots? would be awesome. Maybe add some kind of batteries that you need to produce out of plasteel and uranium that the caravan bots need instead of sleep/food.

Grax

Hauler Bot tried to start doing a null job.
Verse.Log:Warning(String)
Verse.AI.Pawn_JobTracker:StartJob(Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef)
AIRobot.Building_AIRobotRechargeStation:Button_CallRobotForShutdown()
AIRobot.Building_AIRobotRechargeStation:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.Game:<LoadGame>m__72A()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update()
Verse.Root_Play:Update()



This making game LAGGGGGGGGGING.

AngleWyrm

Suggestion
Make it so that robots can be assigned to an area, like colonists or animals. Either one would do.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh