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

Topics - skullywag

#21
Mods / Release subforum and your mods
July 20, 2016, 02:51:16 PM
Hi all,

Gonna be doing a tidy up of the Releases subforum and moving the outdated stuff to the outdated subforum quite soon. Just a poke to get you lazier modders working :P

Anyone who has an issue for whatever reason with this just let me know here.

Thanks.
#22
Hi all.

Ill keep it brief, the update to unity5 has rendered my pen/stylus (surface pro 3) unusable in the new A14 test builds. Onmousedown is not called in unity5 and im hoping they fix it. However in the meantime this has all but killed my ability to mod due to me only having time on my commute and using touch to mod is slow.

Does anyone have any ideas on how i can get around this. Any clever remapping tricks i can use. Im desperate...this could end modding for me, i wont enjoy it if im not productive, plus ive gotten very used to playing the game using a pen and its unnatural to do it any other way now.
#23
Hi Devs,

Simply put I have tried adding my own weater def to the game calling a copy of the fog overlay class, this results in a tiled image moving across the screen but does not have the "rolling" effect that fog has on it ingame, did you guys do something special with the image itself that a simple PNG cannot do or am I missing something here?

Animation master material files? using the unity Material class?
#24
If a mod defines WildBiomes in the RaceDef of a pawn, if more than 1 wildBiome is added the game will error with:

System.ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[Verse.PawnKindDef,System.Single].Add (Verse.PawnKindDef key, Single value) [0x00000] in <filename unknown>:0
  at RimWorld.BiomeDef.CommonalityOfAnimal (Verse.PawnKindDef animalDef) [0x00000] in <filename unknown>:0
  at RimWorld.BiomeDef+<>c__Iterator70.MoveNext () [0x00000] in <filename unknown>:0
  at RimWorld.WildSpawner.get_DesiredAnimalDensity () [0x00000] in <filename unknown>:0
  at RimWorld.WildSpawner.get_DesiredTotalAnimalWeight () [0x00000] in <filename unknown>:0
  at RimWorld.WildSpawner.get_AnimalEcosystemFull () [0x00000] in <filename unknown>:0
  at RimWorld.Genstep_Animals.Generate () [0x00000] in <filename unknown>:0
  at Verse.MapGenerator.GenerateContentsIntoCurrentMap (Verse.MapGeneratorDef def) [0x00000] in <filename unknown>:0


due to the logic in this method not checking the biome so adding the animal to all biomes, to fix:


public float CommonalityOfAnimal(PawnKindDef animalDef)
    {
      if (this.cachedAnimalCommonalities == null)
      {
        this.cachedAnimalCommonalities = new Dictionary<PawnKindDef, float>();
        for (int index = 0; index < this.wildAnimals.Count; ++index)
          this.cachedAnimalCommonalities.Add(this.wildAnimals[index].animal, this.wildAnimals[index].commonality);
        foreach (PawnKindDef pawnKindDef in DefDatabase<PawnKindDef>.AllDefs)
        {
          if (pawnKindDef.RaceProps.wildBiomes != null)
          {
            for (int index = 0; index < pawnKindDef.RaceProps.wildBiomes.Count; ++index)
if( pawnKindDef.RaceProps.wildBiomes[index].biome == this )
                  this.cachedAnimalCommonalities.Add(pawnKindDef.RaceProps.wildBiomes[index].animal, pawnKindDef.RaceProps.wildBiomes[index].commonality);
          }
        }
      }
      float num;
      if (this.cachedAnimalCommonalities.TryGetValue(animalDef, out num))
        return num;
      return 0.0f;
    }


The same issue would also effects plants and diseases if added from another def other than the biomdef. Im going to Detour this in CCL for A13 but would be good to fix this for A14.
#25
Skullywags Event Mods

Here are some mods that add/change incidents:

Click the images to download from my github.


Adds meteorites containing most resources in the game and all stone types that fall randomly and can be mined, also adds a large meteor shower event that can be VERY bad.


Adds a bad event where tonnes of metal falls from the sky from ship parts burning up in the atmosphere, creates small explosions where it lands, has a chance to drop some steel (this can be a tad annoying so they are forbidden when dropped to avoid colonists auto grabbing em).

Alternate Opening
Creates an alternate start to rimworld, well alternate in that the pods crash, you are bruised and battered on landing, the pods smoke and spark and can be scavenged for some scrap metal. Ill add more to this as I go, this is a first release.

License - You may do whatever you want with the code in my mods as long as you dont use it to make money in any way shape or form. This includes taking donations. Modpack owners I require a PM to request inclusion. Art within my mods may not be used without consent, some of the art was not done by me so PM me first.
#26
Bugs / [A13] Mod unable to load any xml defs
April 14, 2016, 04:18:41 PM
We modders are currently experiencing a fair few issues with mods due to the a13 changes. We have worked around or got most of our issues fixed, however some of use are experiencing a rather strange bug especially the combat realism mod, to the point where the dev has gotten so frustrated hes quit. However thats beside the point, can Ison or Tynan have a look here and see if this makes any sense to them.

I have attached an output log that I hope makes some sense to you because we dont understand why the game is trying to load 2 xml files at once.

Once you have attempted to load the mod once and it fails, even if you delete the dll file you can not load even 1 xml file until you rename it, not sure if thats important but it smells a bit like some kind of caching issue somewhere to me.

Anyway if you need any further info please let me know, we would really like to get to the bottom of this one.

[attachment deleted by admin - too old]
#27
A Shinzy/AnonymousFriend/Slack/Apparello conversation gone wrong? you decide.

Add the mrofallo to your game, a genetically modified beast of burden here to dominate the trade.

In the next version the fez will shoot lazerbeams.

credits:

Idea by Kolljak (all his fault really)

[attachment deleted by admin - too old]
#28
Config error in Gate_Blueprint: does not add to map mesh but has a link drawer. Link drawers can only work on the map mesh.

Im lost, ive tried for hours to make this go away, is it possible to have a custom door that links to something else (in this case a gate that links to fences) and not have this error? if i want a custom door thats simple, if i want it to link graphically to something ala sandbags, i get the above, the gate itself was erroring with the same but I changed the drawerType to MapMeshAndRealTime to fix that one, even tried removing the blueprint stuff from the def fully but it makes one dynamically so still errors. Need a break this has bugged me too much.
#29
Help / Alpha 13 modders stuff
March 06, 2016, 03:55:58 AM
Heres what ive found so far:

1. Only 1 BuildingBase and the like is to be defined for each mod.
2. Comp properties can now define the class via the <li> in xml, e.g:
<li Class="CompProperties_Explosive">
3. DamageData is added to graphicData, this controls the damage overlay, so far ive seen:
<damageData>
  <rect>(0.2,0.2,0.6,0.6)</rect>
</damageData>

on a turret.
<damageData>
  <cornerTL>Damage/Corner</cornerTL>
  <cornerTR>Damage/Corner</cornerTR>
  <cornerBL>Damage/Corner</cornerBL>
  <cornerBR>Damage/Corner</cornerBR>
</damageData>

on a battery
<damageData>
  <cornerTL>Damage/Corner</cornerTL>
  <cornerTR>Damage/Corner</cornerTR>
  <cornerBL>Damage/Corner</cornerBL>
  <cornerBR>Damage/Corner</cornerBR>
  <edgeTop>Damage/Edge</edgeTop>
  <edgeBot>Damage/Edge</edgeBot>
  <edgeLeft>Damage/Edge</edgeLeft>
  <edgeRight>Damage/Edge</edgeRight>
</damageData>

on walls.
4. New comp:
<li Class="CompProperties_Breakdownable"/>
This is used by a new incident that makes machinery breakdown and require repairs.
5. In c# props can now be referenced on a comp via Props (capitalised P), e.g:
comp.Props.storedEnergyMax
instead of
comp.props.storedEnergyMax
6. combatTargetBuilding is now defined as a building property, e.g:
<building>
  <ai_combatDangerous>true</ai_combatDangerous>
</building>

instead of
<combatTargetBuilding>true</combatTargetBuilding>
7. Hediff_Stages is no more, you'll now need:
<HediffDef Name="DiseaseBase" Abstract="True">
  <hediffClass>HediffWithComps</hediffClass>
  <defaultLabelColor>(0.8, 0.8, 0.35)</defaultLabelColor>
</HediffDef>

8. singleBillGiverDef in workGivers is no longer, you'll now need, for example:
<fixedBillGiverDefs>
  <li>NameOfWorkbench</li>
</fixedBillGiverDefs>

9. When referring to a drawer on a pawn, capital D now, so:
this.wearer.Drawer.DrawPos;
instead of:
this.wearer.drawer.DrawPos;
10. BrokenStateDef is now MentalStatDef, so for example:
this.wearer.MentalStateDef
instead of:
this.wearer.BrokenStateDef
11. PowerToggleable is gone from CompPowerTrader and is now it own comp:
<li Class="CompProperties_Flickable" />
12. listerPawns is now mapPawns so when doing things like:
Find.Map.listerPawns.AllPawns
you now need:
Find.Map.mapPawns.AllPawns
13. You may need to use the attribute when using static material and such:
[StaticConstructorOnStartup]
A quick snippet from Ison as to why this is the case:
QuoteThis happens because from now on mods are loaded in a different thread. This, combined with the fact that it's impossible to use Unity's functions like loading a texture in threads other than the main one, means that you get an error in such cases. Does your new class have any static resources like Texture, Material or Graphic? If so, it means that during loading the game, when an object of this class is loaded, its static constructor is called and the game tries to load a texture in a different thread. With StaticConstructorOnStartup attribute, class' static constructor is called in the main thread before loading everything else.
You should make all resources static and then use [StaticConstructorOnStartup] attribute on the class, like this:
[StaticConstructorOnStartup]
public class Building_WindTurbineStuffed : Building_WindTurbine

14. Pawn_HealthTracker.ShouldBeTreatedNow is now Pawn_HealthTracker.ShouldBeTendedNow.
#30
Bugs / BuildableDef uiIcon uses mainImage drawsize
February 05, 2016, 04:31:33 AM
More of a modder quality of life tweak this but i could see it being handy for the main game as well.

Gonna use the turret as an example here.

At the moment if you define a uiIconPath on a turret itll use the drawsize of the actual turret and thefore break out of the bounds of the box in the build menu (the base game doesnt suffer as it doesnt use the UI icon option, leaving out the UI icon and therefore using the base texture as the UI icon seems to scale correctly???), adding whitespace around the image (increasing canvas size) is a workaround here.

If possible i feel having graphicProperties for the ui icon as per the main image would be beneficial for everyone. We would be able to define everything about the ui icon and as an added bonus would be able to add shaders and masks allowing us to have for example a correct representation of a turret with its gun (not just the empty base...) and not have it change colour when stuff is switched only the base would change. Everybody wins. Core gets better UI and modders can actually have correct and easily handleable ui images.

Thanks for reading.
#31
Doubt im gonna be around much over christmas so thought id post this.

Merry christmas Tynan, Ison, Al, Rho and anyone else i dont know working at/with Ludeon.

And merry christmas to you lot, anyone here must be awesome and not slightly disturbed in the brain.

Have a great christmas and an awesome new year.

Now i hope santa brings me a new hat...made of leather....

:)
#32
Hi all,

I have a suggestion that I hope Tynan/Ison get to see.

Currently doors are simply rotated when placed on the vertical axis ingame. This A. doesnt fit the perspective of the game at all and B. doesnt allow people to add correct doors/gates based on thinner walls/fences for example. We cannot simply add a custom door class due to the way pawn pather works. So I ask, can we have the ability to at least define textures for doors via a similar method to graphic_multi and have _side or something. Or even better the ability to use custom door classes, or EVEN better both. :)

I understand this is of fairly small importance in the grand scheme of things but it would also slightly benefit the core game with better looking doors.

edit - look what could be done:

https://ludeon.com/forums/index.php?topic=12508.msg127672#msg127672
#33
Outdated / [A12] Project Dog - Community Dog project
September 01, 2015, 05:54:46 PM
Thanks to:

shinzy (GermanShepherd)
mrofa (PitBull)
Stinkycat (Samoyed)
I2032 (BorderCollie)
Milo (Corgi)

for their work on this.



Download 1.5

The github is available for anyone to fork, create a branch and pull request it to be included. So want a dog? add it based on the ones you see in there already. Go nuts! :)
#34
Ideas / Allow biomes to be added via mods
September 01, 2015, 07:13:17 AM
Currently biomes are hard coded in the core code which doesnt allow modders to add biomes.
#35
I dont like it.

Chick 1 is a rooster, i cant change it. It upsets my tidy nature :(

It either needs to be automatic or we should be able to change it.
#36
Unfinished / [Community Mod] Project Dog
August 24, 2015, 08:00:17 AM
https://github.com/Skullywag/ProjectDog

I ask all modders to fork that repo and add more dogs breeds (in a new branch please). Any artists that fancy doing any art please feel free to do so, it will be hugely appreciated.
#37
This came up in the chat over on the modders slack. We can obviously work around it so this is in no way important, this is just to serve as a "if you want to fix it" type dealy.

When assigning graphic_random and you point to a folder, if you have a texture with the same starting string as the folder name in the same dir as the folder, the game will find the file and bomb out as its not a folder, for example textures/metal (folder) and textures/metalSomething (file) would error if the graphic_random texpath was set to textures/metal. A simple fix would be to check the attributes of the file to see if it is of type "Directory".


FileAttributes attr = File.GetAttributes(@"filename");

if ((attr & FileAttributes.Directory) == FileAttributes.Directory)
    // its a folder
else
    // its a file


(my c# isnt the best, the above may not be perfect)

And also Tynan are you happy for possible refactors to be passed this way in this forum or would you prefer them somewhere else.
#38
Mods / Modders standard for definition naming
August 19, 2015, 07:44:50 AM
Hi all,

Ive seen a few conflicts starting to pop up in mods recently in regards to defnames, this is more of a query than me defining a rule but do people think its worth using something like moddername_defname when making new defs to avoid this in future especially with more and more modders joining the ranks.

I for one am gonna update all my mods to do it when A12 drops so all my mods will never conflict in terms of defname.

Thought?
#39
Anyone know how to do this, there is "BrokenStateDef.named("somename")" for it?
#40
Help / Getting a list of doors to a room
July 31, 2015, 12:27:47 PM
Anyone know of a way of getting a list of all doors that a room has from the pawn in it. I have the room object no problem but struggling to get the doors from the room as im not sure they are "contained" within it.

This is probably very simple but ive gone code blind from staring at it.

Save me!