Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Krutchen

#1
So, for my next magic trick, I think i'm gonna try making added body parts be able to affects stats a bit more than just % of pawn capabilities.
Why should an armoured bionic leg not have more health than a regular leg?
Why should it not let you carry more stuff with CR?
#2
https://github.com/Krutchen/CombatRealism/releases/tag/v1.6.51

Quick little patch to 1.6.5, Adds in the much needed ability for raiders to fight back against colonists using embrasures and anything else of the sort. Before, they couldn't shoot back because they could not path to the target location, doors would make your embrasures essentially solid walls to them that you could just pew pew out of. Not any more.

I pretty much just had to make a small detour using the ccl to change how AttackTargetFinder was operating.
#3
Update, I did it. Hell to the yeah.
Put the detour in with combat reality, now i'm faced with the problem of enemies shooting right the hell on through my embrasures, Lol.
Maybe I should make an Opacity float that falls off with range, that affects CanSee or something?
#4
Quote from: skullywag on May 13, 2016, 03:18:30 AM
We would need to find where that weakness in the AI code is first. Its probably in the selectbesttargetfor or whatever. Ill have a look and see if i cant find the cause of this.

Right on, Skullywag, thanks for the timely reply. Just a matter of hunting through the source code now, eh?
Do you think if ((byte)(flags & TargetScanFlags.NeedReachable) != 0) within Verse.AI > AttackTargetFinder may be the culprit?

if (AttackTargetFinder.HasRangedAttack(searcher))
{
AttackTargetFinder.tmpTargets.Clear();
List<IAttackTarget> potentialTargetsFor = Find.AttackTargetsCache.GetPotentialTargetsFor(searcher);
for (int i = 0; i < potentialTargetsFor.Count; i++)
{
AttackTargetFinder.tmpTargets.Add((Thing)potentialTargetsFor[i]);
}
if ((byte)(flags & TargetScanFlags.NeedReachable) != 0)
{
Predicate<Thing> oldValidator = predicate;
predicate = delegate(Thing t)
{
if (!oldValidator(t))
{
return false;
}
if (searcherPawn != null)
{
if (!searcherPawn.CanReach(t, PathEndMode.Touch, Danger.Some, false, TraverseMode.ByPawn))
{
return false;
}
}
else if (!searcher.Position.CanReach(t, PathEndMode.Touch, TraverseParms.For(TraverseMode.NoPassClosedDoors, Danger.Deadly, false)))
{
return false;
}
return true;
};
}
Thing result = GenClosest.ClosestThing_Global(searcher.Position, AttackTargetFinder.tmpTargets, maxTargDist, predicate);
AttackTargetFinder.tmpTargets.Clear();
return result;
}


appears to be checking if a ranged weapon user can physically reach the target, which sounds a lot like what the problem I was having is. If there's a blockage, like say, a door, but if searcherpawn is null it does a second check whilst ignoring the doors?
Hold on though, that doesn't make that much sense to me though - Why would a ranged weapon user need to be able to actually reach the target? There's checks in place for line of sight already, and with the CR LaunchProjectile there's checks for cover height and whatnot as well. Shouldn't searcherPawn.CanReach be reserved for melee based attackers instead, since they're the ones that actually need to reach the target, or is this static named incorrectly?

Unless i'm reading into this incorrectly, could changing this make it so that ranged attackers can target through objects?
#5
Quote from: Krutchen on May 12, 2016, 11:28:57 PM
Well, I've been playing around with embrasures and seeing what's going on and why enemies won't fire through them. It appears as though the deciding factor is or not a raider sees ANYONE outside. If everyone is inside, ie if there's a door between the raider and the target, they won't fire, but the moment the raiders can detect anyone outdoors, they will start firing through embrasures. This is really strange, but i'm going to see if I can find a way around any of this.

So, I posted this in the Combat Realism thread. Would it be possible to make it so AI can detect people that are behind doors and whatnot? Because the big problem is, as I said in the CR thread, that once someone is closed off behind a door, raiders don't target them. Normally, this wouldn't be a problem, but if you have any mods add things like Embrasures, or windows, this can create a serious imbalance, your colonists can easily pop off shots at people with now threat to themselves whatsoever.
Would one need to make a detour for letting raiders fire through or at embrasures whilst someone is behind a door?
#6
Well, I've been playing around with embrasures and seeing what's going on and why enemies won't fire through them. It appears as though the deciding factor is or not a raider sees ANYONE outside. If everyone is inside, ie if there's a door between the raider and the target, they won't fire, but the moment the raiders can detect anyone outdoors, they will start firing through embrasures. This is really strange, but i'm going to see if I can find a way around any of this.
#7
So, i'm having a problem with my tech tree changes. I'm trying to hide Electric Smelting and Machining, but I seem to get errors when I open the research menu if I hide the researches through advanced research. Maybe there's a few dependencies somewhere, but i'm not sure, because it's working with smithing without causing these problems.

I start by swapping the researches that would require cremation over to a different research req, but that doesn't seem to solve any of the problems I am having.

    <AdvancedResearchDef>
        <defName>SmeltingToMetalII</defName>
        <Priority>-1</Priority>
        <researchDefs>
<li>MetalII</li>
        </researchDefs>
        <effectedResearchDefs>
<li>ElectricCremation</li>
        </effectedResearchDefs>
    </AdvancedResearchDef>

    <AdvancedResearchDef>
        <defName>ResearchHiding</defName>
        <Priority>2</Priority>
        <HideDefs>true</HideDefs>
        <researchDefs>
        </researchDefs>
        <effectedResearchDefs>
<li>Smithing</li>
<li>ElectricSmelting</li>
        </effectedResearchDefs>
    </AdvancedResearchDef>


Do you guys think it's some form of dependency issue? I have also changed the requirements for the electric smelter via ModHelper.xml

            <li>
                <menuHidden>true</menuHidden>
                <designationCategory>Production</designationCategory>
                <targetDefs>
                    <li>ElectricSmelter</li>
                </targetDefs>
<researchPrerequisites>
<li>MetalIII</li>
</researchPrerequisites>
            </li>


Anyways, the error that's happening is as follows:

Exception filling window for RimWorld.MainTabWindow_Research: System.StackOverflowException: The requested operation caused a stack overflow.

  at CommunityCoreLibrary.ResearchProjectDef_Extensions._IsLockedOut (Verse.ResearchProjectDef researchProjectDef, Verse.ResearchProjectDef initialDef) [0x00000] in <filename unknown>:0

  at CommunityCoreLibrary.ResearchProjectDef_Extensions._IsLockedOut (Verse.ResearchProjectDef researchProjectDef, Verse.ResearchProjectDef initialDef) [0x00000] in <filename unknown>:0

  at CommunityCoreLibrary.ResearchProjectDef_Extensions._IsLockedOut (Verse.ResearchProjectDef researchProjectDef, Verse.ResearchProjectDef initialDef) [0x00000] in <filename unknown>:0
#8
Quote from: IshOfTheWoods on May 08, 2016, 11:08:59 AM
Just give credit, don't charge money (donations are fine with me), and let others do the same. Good luck!

Awesome, my dude, i'll without a doubt give you a shoutout!
Oh, by the way, has anyone finished updating the noble houses pack yet? If not, I'll give that a whirl in a few minutes.

#9
Quote from: NoImageAvailable on May 08, 2016, 08:45:28 AM
Just uploaded the 1.6.5 release. It mainly updates melee weapons to A13 by adding bulk, weight and armor penetration stats to melee weapons. With this the mod is fully updated to A13 and out of pre-release. It is also the last update I will do as I am leaving Rimworld modding permanently.

That's a real shame! Thanks for all your hard work over the course of this mod's development, though, NoImage, your mod has been integral to pretty much my entire experience with Rimworld and is in my opinion an essential mod for the best rimworld experience.
If I eventually have the time and skill to contribute to Combat Realism, I'll try knocking some of the to do list out.
It's been a pleasure, my dude, Have a good time with whatever life throws at you.
#10
Quote from: Western Gentleman on May 08, 2016, 10:36:13 PM
My game seems to be a bit bugged, not receiving the UI which shows my ammo and gives me the reload button and my pawns are not reloading ammo once they empty their clip even if they have the available space... Anyone else having this problem or...?

Did you restart your game after enabling the mod? That's usually the issue with UI problems.
#11
Speaking of forking this project, would you mind if people used the existing assets in other  projects? I've been playing around with a kind of research tree mod project lately, which revolves around Metalworking & Smithing research trees, and the Medieval gear really fleshes out the early game.
#12
Quote from: st james jack john on May 05, 2016, 08:24:09 AM
Is there anyway to create a build for my colonist including weapons and ammo?

Its a pain in the ass to equip an entire colony when a raid hits, impossible if you have more than 10 colonists.

Use the loadout tab. Make outfits for raids.
Try having one or two dedicated guards that are always equipped for combat, so that they can buy time and defend while you have the rest of your combat capable guys swap to their loadout & outfit to soldiering gear.

Remember, the Outfit and the Loadout tabs are your friends, they make things a thousand times simpler.
#13
Quote from: NoImageAvailable on May 04, 2016, 06:59:48 PM
Quote from: Krutchen on May 04, 2016, 06:46:36 PM
Quote from: NoImageAvailable on May 04, 2016, 03:09:00 PM
Just a quick progress update, turrets are pretty much fully functional, both the automated and manned variants.

Are these in the dev branch at the moment? I could find the automated turrets, but not the manned ones.

Only the code for the main mod is on github, all the new turrets are in the Defence Pack addon which is not.

Oh, good point. Guess I'll have to wait for all that goodness :(
#14
Quote from: NoImageAvailable on May 04, 2016, 03:09:00 PM
Just a quick progress update, turrets are pretty much fully functional, both the automated and manned variants.

Are these in the dev branch at the moment? I could find the automated turrets, but not the manned ones.
#15
Quote from: kimx1636 on May 04, 2016, 09:21:21 AM
NoImageAvailable. I have a couple of questions about the mod since I've been using it for a little while.

1. I can't build turrets from the security, which makes sense since you moved them to the machining table, BUT. I can't find them at the machining table either. Meaning I have no way to build a turret for colony defense. I can still make all the guns and all the ammunition, just no turrets.

Turrets were temporarily disabled until NoImage could finish them up and make them use ammunition. They will be re-enabled when they're ready.