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

#166
// RimWorld.StoryState.ctor
private int lastThreatBigQueueTick = -1;

(..)

// RimWorld.StoryState.ExposeData()
Scribe_Values.LookValue<int>(ref this.lastThreatBigQueueTick, "lastThreatBigQueueTick", 0, true);


Would probably make more sense as:

Scribe_Values.LookValue<int>(ref this.lastThreatBigQueueTick, "lastThreatBigQueueTick", -1, true);
#167
Support / Re: Game does not start anymore
April 07, 2016, 05:43:50 PM
Have patience, the game takes some time to load. It is very possible for the game to become unresponsive for up to what 3 minutes in vanilla
and much, much longer for modded games (depending on your computer, some people have no problem loading mods).

Since you attempted to start the game multiple times it must have started multiple instances, this will not help at all. Again have patience.
#168
// RimWorld.PawnRecentMemory.ctor
private int lastLightTick = 999999;
private int lastOutdoorTick = 999999;

(..)

// RimWorld.PawnRecentMemory.ExposeData()
Scribe_Values.LookValue<int>(ref this.lastLightTick, "lastLightTick", 0, false);
Scribe_Values.LookValue<int>(ref this.lastOutdoorTick, "lastOutdoorTick", 0, false);


Again, unspawned pawns cluttering savefiles with <last___Tick>999999</last____Tick>. Since spawned pawns will not have values of these
proportions it is only useful for pawns that have not been spawned yet.

Scribe_Values.LookValue<int>(ref this.lastLightTick, "lastLightTick", 999999, false);
Scribe_Values.LookValue<int>(ref this.lastOutdoorTick, "lastOutdoorTick", 999999, false);
#169
// Verse.ThingContainer.ctor
private int maxStacks = 99999;

(..)

// Verse.ThingContainer.ExposeData()
Scribe_Values.LookValue<int>(ref this.maxStacks, "maxStacks", 0, false);


Another non logical scribe default, pawns use both an <inventory> (default maxStacks = 99999) and <carrier> (default maxStacks = 1), and a
default of 0 does not account for either and would result in a ThingContainer which does not accept anything since maxStacks is private.

New colony contained 5 of both <maxStacks>1</maxStacks> and <maxStacks>99999</maxStacks>.
#170
Another update;

All audio files were exported as OGG Vorbis with the exact properties of vanilla audio files and again the loading times did not drop in the slightest.




Forcing affinity to a single core did not change audio loading times.

CPU drops to 0% with occasional 1% spikes and increases RAM by the size of each audio file with intervals of 3 seconds between increases. The
final RAM usage is proportional to what one might expect of a modded base game (base game 380 MB RAM, modded 390 MB RAM). Assuming
the problem is not in something weird with decompression/extraction/unpacking of audio into RAM.
#171
// Verse.Thing.ctor
public int stackCount = 1;

(..)

// Verse.Thing.ExposeData()
Scribe_Values.LookValue<int>(ref this.stackCount, "stackCount", 0, true);


Since this is set to 1 by default one could change that to:

Scribe_Values.LookValue<int>(ref this.stackCount, "stackCount", 1, true);

This was a redundancy of 83 occurences on a fresh colony due to pawns in other factions carrying single meals.
#172
Bugs / [A13] Savefile cluttering <health>85</health>
April 07, 2016, 09:09:19 AM
Scribe_Defs.LookDef<ThingDef>(ref this.def, "def");

(..)

if (this.def.useHitPoints)
{
Scribe_Values.LookValue<int>(ref this.hitPointsInt, "health", -1, false);
}


Since def is already initialized at this point the default could be set to def.BaseMaxHitPoints (which might increase save times) or alternatively to 85 (replacing <health>85</health> in a fresh savefile yielded 35014 occurrences). A default of -1 would obviously never help loading/saving times.

All other <health> values (not 85 which has 35014 occurences) add up to 7053 occurrences:

  • 3026 times <health>120</health> (bushes)
  • 3489 times <health>300</health> (trees)
  • 538 other things (walls, equipment)
#173
Bugs / Re: Rimworld title screen freeze and crash
April 07, 2016, 08:19:59 AM
This might be your anti virus software blocking internet connection. Win-key to desktop and check whether that's the case.

Otherwise, that is the manner in which Rimworld loads and you should wait for a while for all assets to load. If you have mods installed there may be a longer loading time.
#174
<thing Class="Filth">
<def>RockRubble</def>
<id>RockRubble6583</id>
<pos>(88, 0, 1)</pos>
<thickness>1</thickness>
</thing>
<thing Class="Filth">
<def>RockRubble</def>
<id>RockRubble6585</id>
<pos>(87, 0, 0)</pos>
<thickness>1</thickness>
</thing>
<thing Class="Filth">
<def>RockRubble</def>
<id>RockRubble6586</id>
<pos>(89, 0, 1)</pos>
<thickness>1</thickness>
</thing>
<thing Class="Filth">
<def>RockRubble</def>
<id>RockRubble6587</id>
<pos>(88, 0, 0)</pos>
<thickness>1</thickness>
</thing>

etc etc etc


Since filth with a thickness of 0 are destroyed it seems counter intuitive to take 0 as the default value for the scribe, especially since a new colony on an average sized map contains 3539 instances of Filth with <thickness>1</thickness>.

Scribe_Values.LookValue<int>(ref this.thickness, "thickness", 0, false);

to

Scribe_Values.LookValue<int>(ref this.thickness, "thickness", 1, false);
#175
Quote from: Alistaire on January 10, 2016, 10:34:15 AMEvery Thing's "pos" is saved since default(IntVec3) is somehow not equal to (-1000,-1000,-1000), since that is IntVec3.Invalid. Replace
the following code:

Scribe_Values.LookValue<IntVec3>(ref this.positionInt, "pos", default(IntVec3), false);

to

Scribe_Values.LookValue<IntVec3>(ref this.positionInt, "pos", IntVec3.Invalid, false);


Anything that is worn, stored or otherwise has no position value has this value saved, introducing one line of text for every one of those that
exist in the game environment (I managed to replace 65 occurences of <pos>(-1000,-1000,-1000)</pos> from a new colony's initial save).

This is still present in A13. For reference:

default(IntVec3) == new IntVec3(0,0,0);
IntVec3.Invalid == new IntVec3(-1000,-1000,-1000);


In A13 creating a new world and colony yielded me 185(!) occurences of <pos>(-1000,-1000,-1000)</pos>, this should be fixed as follows:

Scribe_Values.LookValue<IntVec3>(ref this.positionInt, "pos", IntVec3.Invalid, false);

.. which causes the default value to be assumed to be IntVec3.Invalid as its value is set in the constructor:

private IntVec3 positionInt = IntVec3.Invalid;




  • The same is the case for Faction.homeSquare (default(IntVec2) == (0,0); IntVec2.Invalid == (-1000,-1000))
#176
Quote from: Alistaire on March 31, 2016, 04:19:07 AM
Verse.LanguageDatabase.LoadAllMetadata():


LanguageDatabase.defaultLanguage = LanguageDatabase.languages.FirstOrDefault((LoadedLanguage la) => la.folderName == LanguageDatabase.DefaultLangFolderName);
LanguageDatabase.activeLanguage = LanguageDatabase.languages.FirstOrDefault((LoadedLanguage la) => la.folderName == Prefs.LangFolderName);
if (LanguageDatabase.activeLanguage == null)
{
Prefs.LangFolderName = LanguageDatabase.DefaultLangFolderName;
LanguageDatabase.activeLanguage = LanguageDatabase.languages.FirstOrDefault((LoadedLanguage la) => la.folderName == Prefs.LangFolderName);
}
if (LanguageDatabase.activeLanguage == null || LanguageDatabase.activeLanguage == null)
{
Log.Error("No default language found!");
LanguageDatabase.defaultLanguage = LanguageDatabase.languages[0];
LanguageDatabase.activeLanguage = LanguageDatabase.languages[0];
}


if (LanguageDatabase.activeLanguage == null || LanguageDatabase.activeLanguage == null)

Better double check it, you never know with those public statics.

Still present in A13, I assume you'd want to check for defaultLanguage == null or remove the second activeLanguage check.
#177
General Discussion / Re: R.I.P Xerigium
April 07, 2016, 04:44:46 AM
healroot

foodfruit
clothflower
armormushroom
woodtree
boomra-.. okay
#178
I'll post a nice output log now.

Loading vanilla game (previous boot):
- 2732ms Load all active mods.

- - 2723ms Loading [Core|Core]

- - - 2720ms Loading all defs


Closing mod menu MAIN THREAD:
12539ms LoadAllPlayData

- 11786ms Load all active mods.

- - 11133ms Loading [Core|Core]

- - - 11133ms Loading all defs

- - 653ms Loading [Rimfire 1.9|Rimfire 1.9]

- - - 322ms Loading all defs


Closing mod menu MOD THREAD:
109927ms Loading assets of type UnityEngine.AudioClip for mod Rimfire 1.9

- 3146ms Loading file Things/93R

- 3138ms Loading file Things/AA12

- 3129ms Loading file Things/AK47

- 3140ms Loading file Things/ArmaliteAR50

- 3139ms Loading file Things/Cannon+Mortar

- 3143ms Loading file Things/Cannon

- 3129ms Loading file Things/CX4

- 3137ms Loading file Things/Deringer

- 3140ms Loading file Things/Galil

- 3138ms Loading file Things/GreaseGun

- 3138ms Loading file Things/GreaseGunTick

- 3136ms Loading file Things/HKUSC

- 3163ms Loading file Things/M134

- 3135ms Loading file Things/MadsenLAR

- 3137ms Loading file Things/MD50

- 3138ms Loading file Things/MilkorMGL

- 3137ms Loading file Things/Mortar

- 3127ms Loading file Things/Mosin

- 3135ms Loading file Things/ParaOrdnanceP1445

- 3152ms Loading file Things/RPG7

- 3140ms Loading file Things/RugerPC9

- 3143ms Loading file Things/Scout

- 3134ms Loading file Things/Skorpion

- 3130ms Loading file Things/SphinxAT2000

- 3139ms Loading file Things/Striker

- 3134ms Loading file Things/TaurusJudge

- 3140ms Loading file Things/Tec9

- 3129ms Loading file Things/TMP

- 3140ms Loading file Things/TokarevTT

- 3131ms Loading file Things/Type96LMG

- 3151ms Loading file Things/UltimaRatioHecateII

- 3153ms Loading file Things/Vector

- 3140ms Loading file Things/VektorCP1

- 3151ms Loading file Things/WA2K

- 3136ms Loading file Things/XM8


It appears the problem was moved to another thread. There was a change in CPU usage while audio was loading from 1% in A12 to 0% in A13, and the loading times have increased by 10ms overall for each audio file. Now the bottleneck is the same but it's taking up another core.

The threaded approach would have to be used for each audio file being loaded so that overall you would have each core loading audio files in tandem and each taking 3100ms max. I doubt this would be much more efficient though, and I think the current multithreading approach would break on single core computers (though I don't have one of those handy - testing it would require creating a single mod with SoundDef).

Reading up on some of this I found that the ridiculous loading times could have something to do with audio file decompression, and pausing the thread actually does not help.

[attachment deleted by admin - too old]
#179
Alpha 13 plans

For this version of Rimfire a CCL (Community Core Library) MCM (Mod Configuration Menu) will be added to switch between gun names, select
and deselect guns to be spawned in-game and make sure deselected guns will be actively removed from the game. The decision to use CCL will
mean it will take some time for Rimfire to update to 1.9 for A13.

Besides that A13 appears to be quite different from A12 in that weapon crafting is apparently a vanilla thing now. Exciting stuff!
#180
Bugs / The Grand Minor [A13] Bug Thread
April 06, 2016, 03:32:07 PM
The "this bug doesn't deserve its own thread" thread! Let's begin:

  • Weapons_Guns.xml contains references to ParentName="BaseBullet" however that ThingDef is never defined in that file.
Apparently this is intentional - Abstracts are now defined for all files in one folder at least.