[1.1] RunAndGun

Started by Roolo, October 14, 2017, 02:36:40 PM

Previous topic - Next topic

Enemy pawns should be able to shoot while they are fleeing

Yes please! I would do the same if I were fleeing with a gun in my hands.
31 (73.8%)
No, let me have my revenge!
11 (26.2%)

Total Members Voted: 42

BrokenValkyrie

Thanks for the write up. At least I know its something I can change on my end. I'll look into tweaking the animal to be a bit more aggressive with movement. The main idea was to have manhunter shoot at fleeing pawn.

Tenshi~Akari

Hello!

Thanks again for the work & updates to this mod. Very essential to my experience.

I think I came across a not-so-friendly issue when using this with Miscellaneous MAI mod, though...

Object reference not set to an instance of an object
at RunAndGun.Harmony.Pawn_DraftController_GetGizmos_Patch.Postfix (System.Collections.Generic.IEnumerable`1<Verse.Gizmo>&,Verse.Pawn&) <0x000ff>
at (wrapper dynamic-method) Verse.Pawn.GetGizmos_Patch3 (object) <0x00056>
at (wrapper dynamic-method) RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor_Patch0 (System.Collections.Generic.IEnumerable`1<object>) <0x00148>
at RimWorld.MainTabWindow_Inspect.DrawInspectGizmos () <0x0003e>
at RimWorld.InspectPaneUtility.ExtraOnGUI (RimWorld.IInspectPane) <0x00062>
at RimWorld.MainTabWindow_Inspect.ExtraOnGUI () <0x00014>
at Verse.WindowStack.WindowStackOnGUI () <0x00065>
at RimWorld.UIRoot_Play.UIRootOnGUI () <0x000d7>
at Verse.Root.OnGUI () <0x000c6>


What happens: Whenever the MAIs are loaded after auto draft into a generated caravan event map (ambush, rescue, etc.) or even selected while drafted on said map for that matter, there is absolutely no UI or context menus that appear, no matter where I click or what I press... almost as if the game becomes unresponsive, but can only get out of the predicament by double-clicking on the base pawn group and selecting a human pawn.

I've already mentioned this in Haplo's thread, but since the log & thousands of hidden ticks mentioned this mod in particular, is there any possible fix for this? It works just fine with the MAIs on the main base map, it just this small issue when caravaning with my android crew to take out bandit camps or rescue pawns becomes a slight issue, especially if there's no normal human pawn that's with them... they'd end up stuck there until their energy runs out or something of the like, I guess.


Roolo

Quote from: Tenshi~Akari on January 23, 2018, 12:22:40 PM
Hello!

Thanks again for the work & updates to this mod. Very essential to my experience.

I think I came across a not-so-friendly issue when using this with Miscellaneous MAI mod, though...

Object reference not set to an instance of an object
at RunAndGun.Harmony.Pawn_DraftController_GetGizmos_Patch.Postfix (System.Collections.Generic.IEnumerable`1<Verse.Gizmo>&,Verse.Pawn&) <0x000ff>
at (wrapper dynamic-method) Verse.Pawn.GetGizmos_Patch3 (object) <0x00056>
at (wrapper dynamic-method) RimWorld.InspectGizmoGrid.DrawInspectGizmoGridFor_Patch0 (System.Collections.Generic.IEnumerable`1<object>) <0x00148>
at RimWorld.MainTabWindow_Inspect.DrawInspectGizmos () <0x0003e>
at RimWorld.InspectPaneUtility.ExtraOnGUI (RimWorld.IInspectPane) <0x00062>
at RimWorld.MainTabWindow_Inspect.ExtraOnGUI () <0x00014>
at Verse.WindowStack.WindowStackOnGUI () <0x00065>
at RimWorld.UIRoot_Play.UIRootOnGUI () <0x000d7>
at Verse.Root.OnGUI () <0x000c6>


What happens: Whenever the MAIs are loaded after auto draft into a generated caravan event map (ambush, rescue, etc.) or even selected while drafted on said map for that matter, there is absolutely no UI or context menus that appear, no matter where I click or what I press... almost as if the game becomes unresponsive, but can only get out of the predicament by double-clicking on the base pawn group and selecting a human pawn.

I've already mentioned this in Haplo's thread, but since the log & thousands of hidden ticks mentioned this mod in particular, is there any possible fix for this? It works just fine with the MAIs on the main base map, it just this small issue when caravaning with my android crew to take out bandit camps or rescue pawns becomes a slight issue, especially if there's no normal human pawn that's with them... they'd end up stuck there until their energy runs out or something of the like, I guess.

Sure, I'll look into it.

Roolo

#108
Today I tried fixing the crashing issue that can appear on Linux and Mac when enemy pawns start fleeing. I did not succeed, but I did find a (really odd) workaround.
I tried running the game trough gdb in an attempt to get more debugging info. To my surprise, the crashing issues were completely gone when doing this.

The error that triggers the crash is:
Thread 1 "RimWorldLinux.x" received signal SIGILL, Illegal instruction. This error seems to be  thrown when a Hugslib setting is requested. I don't really have a clue why exactly this SIGILL is thrown, but i can imagine it has something to do with the Hugslib settings file being accessed while the OS doesn't allow this for some reason. So my guess is that when running the game through GDB this is somehow resolved (maybe the OS allows it because it's accessed trough gdb? I really don't have a clue, so I'm just speculating).

For anyone who wants to try this workaround but doesn't know how to run Rimworld through gdb:
In the command line go to the Rimworld main directory. cd ~/.local/share/Steam/steamapps/common/RimWorld
type gdb

now in gdb, type:
exec-file ./RimWorldLinux.x86 (you only need to do this once)
run ./start_RimWorld.sh

Please let me know if this solved the issue for you.






kubolek01

Haven't seen anything around this, but if I change to a sidearm while aiming is on, game crashes. Just freezes. Drafting and turning R&G off fixes it. What the heck is this bug?
Eat lead, walking pile of silver! (greedy Player)
I...I can't do it. Leave it alive, please!(inner soul)
It lives 200 years to end up as a jacket?!(realists mind)
If I would go to vacation in off-Earth, even fictional place, I'd choose Nibel.

Roolo

#110
I released an update for RunAndGun (now v0.18.3.3).
-Fixed crashing issue that occurred on some Unix systems when enemy pawns start fleeing.

I finally managed to fix the notorious crashing issue! Now Unix users can safely use RunAndGun again without having to worry about crashes. Apparently there's a problem in Harmony that causes a crash when patched (implemented) virtual methods are called.  Thanks to lashtear, I now know how to get debug information to track down such crashes (the Rimworld log didn't contain any information, but using gdb to introspect Rimworld proved very useful). So if any other modders happen to get such crashes, they can contact me now so I can help them.

Please do report it when you still get crashes after the update.


Quote from: Tenshi~Akari on January 23, 2018, 12:22:40 PM
Hello!

Thanks again for the work & updates to this mod. Very essential to my experience.

I think I came across a not-so-friendly issue when using this with Miscellaneous MAI mod, though...

[...]
What happens: Whenever the MAIs are loaded after auto draft into a generated caravan event map (ambush, rescue, etc.) or even selected while drafted on said map for that matter, there is absolutely no UI or context menus that appear, no matter where I click or what I press... almost as if the game becomes unresponsive, but can only get out of the predicament by double-clicking on the base pawn group and selecting a human pawn.

I've already mentioned this in Haplo's thread, but since the log & thousands of hidden ticks mentioned this mod in particular, is there any possible fix for this? It works just fine with the MAIs on the main base map, it just this small issue when caravaning with my android crew to take out bandit camps or rescue pawns becomes a slight issue, especially if there's no normal human pawn that's with them... they'd end up stuck there until their energy runs out or something of the like, I guess.

Tenshi~Akari, I couldn't reproduce the issue you reported. I formed a caravan with an MAI robot, and made sure it was ambushed. Everything seemed to work properly when I drafted the robot and selected it. Are you sure the version of RunAndGun you use is up to date?

Tenshi~Akari

#111
I had the most recent of both mods, but I will try to see if anything is different with this most recent update and let you know if I come across anything strange again.

EDIT: So far, it's working now. Nothing has changed as far as my other mods & my order, so not sure exactly what was going on in the previous version I had. I was sure it was the most up-to-date I could've gotten it before... but so far with the new R&G update, haven't come across the gizmo bug with MAI yet.  Thanks for still looking into it, though!

EDIT #2: OK, so not coming across any issues other than MAIs don't gun while they run. They'll draft just fine still, but where they should be shooting, even if it's just them and nothing's blocking their line of fire, they're stuck still doing Vanilla shooting mechanics for some reason. No error logs came up related to this so...

Ruisuki

So sick bro i wanna try. But i run quite a few mods so wondering just in case of incompatibility with current mod setup how difficulty is uninstalling?

Canute

Ruisuki,
mod's that don't add item to the game are normal easy to remove.

You might get an error on loading after you deactivate the mod, but that shouldn't break the safegame.

Roolo


Roolo

Quote from: Tenshi~Akari on February 09, 2018, 02:50:32 PM

EDIT #2: OK, so not coming across any issues other than MAIs don't gun while they run. They'll draft just fine still, but where they should be shooting, even if it's just them and nothing's blocking their line of fire, they're stuck still doing Vanilla shooting mechanics for some reason. No error logs came up related to this so...

Yes i'm aware of that. I'm planning to completely change the method of linking RunAndGun data to pawns, which should solve this. Right now any race with ThingClass=Pawn in the XML def gets RunAndGun capabilities, but apperently some mods don't set this property.

Tenshi~Akari

Quote from: Roolo on February 13, 2018, 06:45:56 AM
Quote from: Tenshi~Akari on February 09, 2018, 02:50:32 PM

EDIT #2: OK, so not coming across any issues other than MAIs don't gun while they run. They'll draft just fine still, but where they should be shooting, even if it's just them and nothing's blocking their line of fire, they're stuck still doing Vanilla shooting mechanics for some reason. No error logs came up related to this so...

Yes i'm aware of that. I'm planning to completely change the method of linking RunAndGun data to pawns, which should solve this. Right now any race with ThingClass=Pawn in the XML def gets RunAndGun capabilities, but apperently some mods don't set this property.

I see. No wonder I was having so many issues, MAIs definitely have their own ThingClass altogether. Well, looking forward to that whenever you're able to get it all settled!  ;)

Mr_Man

CE just had a full release for B18 finally yesterday - still compatible?

Roolo

Quote from: Mr_Man on February 22, 2018, 11:24:29 AM
CE just had a full release for B18 finally yesterday - still compatible?

I'd say just try it out and let us know if it is.

Ruisuki

i forbid incindeary launcher from running and gunning yet the ai is still using it while fleeing