[A17] Colony Leadership and Teaching v1.3

Started by Nandonalt, January 22, 2017, 04:27:35 PM

Previous topic - Next topic

azulusthra

System.StackOverflowException: The requested operation caused a stack overflow.
  at Nandonalt_ColonyLeadership.IncidentWorker_LeaderElection.ElectLeader (System.Collections.Generic.List`1 toBeIgnored) [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.Map:MapPostTick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()

Attempted to start an election after getting a 5th colonist for 2nd leader. Lags the game until CTD. Any ideas ?

Madman666

Quote from: Nandonalt on January 23, 2017, 10:00:07 AM
Currently, all colonists will attend the class if they aren't in some states(sleeping, resting to heal, stuff like that). But I'm thinking about adding a way to select which ones will attend and who will ignore it.

That would be very good, having them all drop everything to attend kind of inconvenient at times. Also some lost cases just don't really expected to learn anything (a janitor and a coma child that has disabled pretty much everything but dumb labor and shooting isn't really needed there, he might as well be sweeping the yard instead of wasting his time).

Cassiopea

I like the premise of your mod and I've downloaded it to test it alongside a slew of other mods. While I can elect a leader, I've noticed an error that loops when sending them in a caravan. Said caravan cannot move and the error keeps looping in the log. That being said, if the leader is not among the caravan member, the caravan mechanic works just fine.

System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.GenGrid.InBounds (IntVec3 c, Verse.Map map) [0x00000] in <filename unknown>:0
  at Verse.GenRadial+<RadialDistinctThingsAround>c__Iterator21D.MoveNext () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.Thing].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.Thing]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.ToList[Thing] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at Nandonalt_ColonyLeadership.HediffLeader.Tick () [0x00000] in <filename unknown>:0
  at Verse.Pawn_HealthTracker.HealthTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at RimWorld.Planet.WorldPawns.WorldPawnsTick () [0x00000] in <filename unknown>:0
  at RimWorld.Planet.World.WorldTick () [0x00000] in <filename unknown>:0
  at Verse.TickManager.DoSingleTick () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()


Full log is here:
https://gist.github.com/HugsLibRecordKeeper/f8a9e039f6246dc85854fdc501f3ad96

Nandonalt

Quote from: Cassiopea on January 23, 2017, 01:00:23 PM
I like the premise of your mod and I've downloaded it to test it alongside a slew of other mods. While I can elect a leader, I've noticed an error that loops when sending them in a caravan. Said caravan cannot move and the error keeps looping in the log. That being said, if the leader is not among the caravan member, the caravan mechanic works just fine.

System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.GenGrid.InBounds (IntVec3 c, Verse.Map map) [0x00000] in <filename unknown>:0
  at Verse.GenRadial+<RadialDistinctThingsAround>c__Iterator21D.MoveNext () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.Thing].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.Thing]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.ToList[Thing] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
  at Nandonalt_ColonyLeadership.HediffLeader.Tick () [0x00000] in <filename unknown>:0
  at Verse.Pawn_HealthTracker.HealthTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at RimWorld.Planet.WorldPawns.WorldPawnsTick () [0x00000] in <filename unknown>:0
  at RimWorld.Planet.World.WorldTick () [0x00000] in <filename unknown>:0
  at Verse.TickManager.DoSingleTick () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()


Full log is here:
https://gist.github.com/HugsLibRecordKeeper/f8a9e039f6246dc85854fdc501f3ad96

Thanks for the report! I already submitted the bugfix to steam and dropbox! :)

@azulusthra: oh my, a stack overflow! I'll look into the code to see if I can find what can cause this. Thanks :)


XeoNovaDan

This mod is definitely something!

Haven't played with it yet, but will in the very near future!

Napple

The Caravans aren't moving where I want them when I'm using this mod.

Pichu0102

Could we get a blue message after teaching summarizing what was taught and if any levels were gained?

AnNyeong

Just having the mod enabled without even trying it out (I actually forgot I had installed it) really messed my FPS hard! Down to 5-10 fps for some reason. I'm using about 15 other mods, can't tell if it's a conflict. I'll test it later.

Nandonalt

@AnNyeong: I don't think my mod would do that because if there's no leaders/teaching tables/etc, my mod isn't running anything.

VERSION 1.1:
->BALLOT BOX. You no longer can trigger elections on your own. You'll have to build the ballot box (found on Misc) on a safe spot and wait for the colonists start a election by themselves. Elections can happen on days 1, 7 and 15.
(If you didn't like this change, the button to start election is enabled on dev mode but will be removed on a later version)
-> You can now select which colonists will not attend lessons by using the new 'Ignore List' button on the schedule window.
-> Leaders now have a star on their colonist icon.
-> Fixed error showing up when there's no able leaders to select on the dev option.
-> Fixed caravan related bugs.
-> Fixed a bug where you could build multiple teaching table blueprints.

Zakhad

An awesome mod I was wondering if it was mechanically possible to do this, after my last masterwork dwarf fortress session where I was focusing on my millita training, I thought why hasn't rimworld got a teaching mechanic yet :S

kcirdor

Is that star going to conflict with Killface's Colonist bar?

Nandonalt

Quote from: kcirdor on January 24, 2017, 02:40:54 PM
Is that star going to conflict with Killface's Colonist bar?

I detour the drawIcon method of the class that draws the colonists on the bar, but if Killface's mod overwrite it there's no worries, as it's only a visual indicator.

minakurafto

it would be nice if ,leader can influence colony policy like, if the leader is psycopath or something, it can turn colony to pirate which make mood penalty for cruelty(sell slave, organ harvest)  is reduced greatly if not eliminated.
ability to forcefully make a pawn become a leader, in order to access some policy like above, and depend on pawn connection (friend will agree, rival or friend of rival will have mood debuff) other pawn will make riot (mental breakdown)

Beathrus

YES! Time to rename all my pawn who become leader to 'Mr/Ms Bossy'!