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 - Vherid

#1
Oh wow, it was something stupid on my part, thanks
#2
Quote from: Tynan on June 13, 2015, 09:06:16 PM
Ok, could you just post a zip with the mod that causes the error? I'll just install the mod and debug from there. It's almost certainly some dumb mistake in my code. Thanks.

No problem, thank you as well.
https://www.dropbox.com/s/78tiys1gkgoq8us/MetroT.zip?dl=0
#3
Yeah basically as skullywag said,

The game breaks and spits an error while trying to spawn a modded pawn kind in a modded faction, with modded weapons. It has been narrowed down to something very weird going on with weapon tags. This is obviously an issue when trying to start sieges/raids or directly spawning pawns via debug.

Should just spawn/generate properly, as the files have been scrutinized quite enough for any sort of minor errors, hopefully.

After a lot of toying around with the tags, as I've said it's been narrowed down to the use of the weapontags for some reason. I have a bunch of weapons set up with multiple and different tags for each so that, when I say spawn a sniper or a heavy trooper, they are picking from a proper assortment of weapons. For some reason, doing this causes massive errors to break out. If I change all the "class" tags to just the overhead "MetroGun" tag, the game works fine.

This is the equivalent of Using the sniper rifle tag being broken, but then using just gun working perfectly fine. There's something odd happening somewhere and we have yet to figure out why or how to fix it.
#4
Yeah I don't know. I will tweet to tynan or something.
#5
Quote from: skullywag on June 13, 2015, 03:27:36 PM
AHA, ok this is what I think is happening, so 1 faction from your list active with 1 pawnkind from your list in it, that pawnkind is allowed "metroscout" weapons 150-300 cash available. I left only the lowlife weapon available which had both "metroscout" and "metrogun" tags, spawning a raid with this setup results in errors....changing the marketvalue above 150 (as its 120 by default) stops the errors. Gonna continue testing with more weapons and pawn kinds to be sure.

Now that really doesn't make any sense. I get more money then this item so I break?
#6
Quote from: skullywag on June 13, 2015, 03:20:23 PM
Hang on core has "gun" and "sniperrifle" the sniperrifle should therefore have 2 tags....right?

If you look at the merc pawnkind who uses it, he only uses the sniperrifle tag.

I got rid of the Basehumangun with the weapons tag part and attached all the weapons to just basegun to use the weapon class tags without metrogun being a thing. Works with some pawn classes, but not others it seems.
#7
Quote from: skullywag on June 13, 2015, 03:06:41 PM
hmm so if i have 1 pawn kind in the faction and have that pawn kind use metrogun and remove the lower level guntag and just use metrogun on the weapon itself I am not getting the error (or its very rare, spawned about 30 8000 point raids and no errors)

So the way the xml works as it works its way back up through its parents its adding the weapontags so is there an issue with multiple weapon tags, does core have multiples?...

edit - haha yeah my surface pro 3 is VERY hot right now after 30 raids loaded up, decided to spawn in a friendly 8000 pointer and let them go to town, was a good fight.

lol yeah I had some huge fights with sieges and then got a bunch of sandbag building errors but I assume that's probably what happens when 200 guys against 200 fight near the construction area.

The factions can use multiple pawn types there's no issue there, as long as they just use MetroGun instead of the class tag which is already applied to all weapons via the parent thing.

There must be some sort of issue with multiple tags added to weapons because I wanted to try and seperate the weapons into classes via more specific tags for each and every single weapon(So you didn't have snipers using shotguns and shit like that, heavy troops would stick to the really big shit, etc.), and by trying to use those, there's an issue apparently. Despite my understanding that as long as a person matches just one of the tags he can "grab" it, and multiple tags shouldn't be an issue.

Maybe it's a bug?

EDIT: Core weapons do have their own unique tags too, so I really have no clue. You can see some pawn kinds using it as well, as well as multiple tags.
#8
Interestingly enough, If I set the pawn kinds to grab from the overarching MetroGun tag instead of their specific class tags that are attributed to each weapon, I get errors on some of the pawn spawns but not all of them.

NullReferenceException: Object reference not set to an instance of an object
  at Verse.Pawn_EquipmentTracker.AddEquipment (Verse.ThingWithComps newEq) [0x00000] in <filename unknown>:0

  at RimWorld.PawnWeaponGenerator.TryGenerateWeaponFor (Verse.Pawn pawn) [0x00000] in <filename unknown>:0

  at Verse.PawnGenerator.GeneratePawn (Verse.PawnKindDef kindDef, RimWorld.Faction faction, Int32 tries) [0x00000] in <filename unknown>:0

  at Verse.Dialog_DebugActionsMenu+<DoListingItems_GameModeMap>c__AnonStorey2A7.<>m__417 () [0x00000] in <filename unknown>:0

  at Verse.DebugTool.DebugToolOnGUI () [0x00000] in <filename unknown>:0

  at Verse.DebugTools.DebugToolsOnGUI () [0x00000] in <filename unknown>:0

  at EdB.Interface.UIRoot_Map.UIRootOnGUI () [0x00000] in <filename unknown>:0

  at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)


EDIT: Actually this happens for them regardless of which tag I use, maybe one gun is broken or something.

EDIT2: I have narrowed it down, there is something broken in the grenades/melee things. Well. It stops the single pawn errors from happening, but raids still break. NVM

EDIT3: Okay so if I replace their metroclass weapon tag in pawnkinds with gun, the error happens a shitload, if I then remove the melee/explosive and keep it to only gun, it doesn't happen at all. Seems like some sort of issue with multiple tag choices? That doesn't make any sense though. If you use JUST the class it happens a lot more rarely. Using JUST MetroGun had an issue earlier, and now with Bandits it's not an issue, I don't even.

EDIT4: Using JUST MetroGun for pawnkind weapon tags allowed an 8000 raid to finally happen, also what a drop point
#9
Quote from: skullywag on June 13, 2015, 01:49:12 PM
Ok so a little debugging with the live code and ive narrowed it down to:


public static void TryGenerateWeaponFor(Pawn pawn)
{
if (pawn.kindDef.weaponTags == null || pawn.kindDef.weaponTags.Count == 0)
{
return;
}
if (!pawn.RaceProps.ToolUser)
{
return;
}
float weaponMoney = pawn.kindDef.weaponMoney.RandomInRange;
IEnumerable<ThingStuffPair> source =
from w in PawnWeaponGenerator.potentialWeapons
where w.Price <= weaponMoney && (pawn.Faction == null || pawn.Faction.def.techLevel.CanSpawnWithEquipmentFrom(w.thing.techLevel)) && pawn.kindDef.weaponTags.Any((string tag) => w.thing.weaponTags.Contains(tag))
select w;
if (!source.Any<ThingStuffPair>())
{
return;
}
ThingStuffPair thingStuffPair = source.RandomElementByWeight((ThingStuffPair w) => w.Commonality * w.Price);
ThingWithComps thingWithComps = (ThingWithComps)ThingMaker.MakeThing(thingStuffPair.thing, thingStuffPair.stuff);
PawnGenerator.PostProcessGeneratedGear(thingWithComps, pawn);
pawn.equipment.AddEquipment(thingWithComps);
}

Its getting to the last line of that without an object somehow (it shouldnt obv), the debug_ stuff is a red herring due to how the raid was spawned. Im gonna keep going and see if i cant find how its breaking here.

Hm, and like I said, I went and tried spawning every pawn type on it's own about 30 times, no issues at all generating gear, or spawning. There's some really weird cross issue going on somewhere.
#10
Unfinished / Re: [WIP] A Metro Universe Mod
June 13, 2015, 12:56:42 PM
Quote from: skullywag on June 13, 2015, 12:49:43 PM
Some of your apparel is missing a market value, could that be the cause maybe?

Some of core hats don't have them either, like the cowboy hat, so I don't think so.

EDIT: Confirmed not the issue.
#11
Unfinished / Re: [WIP] A Metro Universe Mod
June 13, 2015, 12:40:29 PM
Quote from: skullywag on June 13, 2015, 12:24:56 PM
ive posted a couple of questions over on that thread. Is all this in the mod download? can i dl it and create the error?

No that's very out of date, here's the entire thing to date.
https://www.dropbox.com/s/d6hlls2f5mxrl2d/Metro.zip?dl=0
#12
Help / Re: Issue with Generating Pawns
June 13, 2015, 12:25:43 PM
Quote from: skullywag on June 13, 2015, 12:23:42 PM
Whats the cost of the items its trying to add to the pawns? is there any scope where it wouldnt find at least at one item in an allowed category?

There was some issues previously where it notified me that their minimum spendings were set too low on some of the classes to get the cheapest weapon avail to them, I fixed that.

I could try setting their min maxes both really high to see what happens further though. There is something odd related going on, because, if you spawn like a really cheap poor equipped raid by like the cultists or satanists, theres no problem.

EDIT: So the more points given to the raid the less likely it is to work. 25PT raids work most of the time regaurdless of faction, 8k raids don't ever work. I gave them all way higher price counts though and that didn't help. I've added all the thingdef XMLs to OP.

Directly spawning pawn types does not have any issues.
#13
Unfinished / Re: [WIP] A Metro Universe Mod
June 13, 2015, 11:50:29 AM
Quote from: skullywag on June 13, 2015, 11:19:06 AM
Yay more shackers! Love you lot! so gutted i didnt get in but with 2 kids now i doubt id have had time to commit so probably for the best. /offtopic.

You gonna add armour/clothing to this? the whole fallout event in Alpha11 is crying out for a gasmask type thingy.

I have all the helmets,
Quote from: Vherid on January 08, 2015, 06:05:43 PM
Knit Cap
Ushanka
Officer's Cap
Tanker Helmet
Balaclava
SSh-40 Steel Helmet
SSh-68 Steel Helmet
ZSH-1 Composite Helmet
Maska Helmet
Sphera Helmet

I was going to do clothing/body armor next, none of the helmets have custom graphics yet either though. I should probably add a Stahlhelm for the reich too.

Main problem though is that faction raids/sieges are currently broken and I have no idea how to fix it, I've tried to cross reference everything to core thingdefs as much as possible and can't figure it out. I've fixed every single other issue except this. I can't release this until it is fixed too.
https://ludeon.com/forums/index.php?topic=13673.0
#14
Unfinished / Re: [WIP] A Metro Universe Mod
June 13, 2015, 09:55:06 AM
Quote from: skullywag on June 13, 2015, 04:16:40 AM
good to see you picking this back up, was looking forward to it. :)

(also youre not Shacktac Vherid are you?)

Yes I am.
#15
Unfinished / Re: [WIP] A Metro Universe Mod
June 12, 2015, 03:06:42 PM
I've been fixing a million XML changes to bring this to Alpha 11, and I will release it once fixed in it's current state as it has a decent chunk of content going for it to start.