[1.5] JecsTools [4/8/2024]

Started by jecrell, May 26, 2017, 10:16:37 AM

Previous topic - Next topic

jecrell

Quote from: CannibarRechter on August 29, 2017, 08:16:27 PM
I didn't see an example for the oversized weapon. Here's how I made it work:

   <Operation Class="PatchOperationAdd">
      <xpath>*/ThingDef[@Name = "BaseWeapon"]/comps</xpath>
      <value><li Class="CompOversizedWeapon.CompProperties_OversizedWeapon"/></value>      
   </Operation>
   <Operation Class="PatchOperationAdd">
      <xpath>*/ThingDef[@Name = "BaseWeapon"]/graphicData</xpath>
      <value><drawSize>(2,2)</drawSize></value>      
   </Operation>

IOW, this makes it so that all weapons in the game will honor drawSize, when equipped.

Jec, I have a request: can we get a version that honors ground drawing increases also? Anyway, I can compile C#, but don't know my way around Rimworld very well. If you can suggest what to detour, I can make a DLL like that, and perhaps play around with a custom property.

I will get around to it sometime my good man.

Also...
JecsTools - 10-3-17 - CaravaJobs and WorldObjectBlueprint

Added CaravanJob systems.
Added WorldObjectBlueprint to allow for construction of WorldObjects through the CaravanJob system.

For implementation -- see RimRoads.
...Psst. Still there? If you'd like to support
me and my works, do check out my Patreon.
Someday, I could work for RimWorld full time!

https://www.patreon.com/jecrell

CannibarRechter

Hey, Jec,

Haven't seen you around in a while. I implemented the version that draws big on the ground.  It basically leaves your comp alone except to add an attribute, and if the attribute is set, also draws the item big on the ground. I'm at work, but I can link you a copy of it later today if you would like to incorporate it.

CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

jecrell

Quote from: CannibarRechter on October 03, 2017, 08:48:14 AM
Hey, Jec,

Haven't seen you around in a while. I implemented the version that draws big on the ground.  It basically leaves your comp alone except to add an attribute, and if the attribute is set, also draws the item big on the ground. I'm at work, but I can link you a copy of it later today if you would like to incorporate it.

Sounds great, my good man.
Whenever you have time.
...Psst. Still there? If you'd like to support
me and my works, do check out my Patreon.
Someday, I could work for RimWorld full time!

https://www.patreon.com/jecrell

CannibarRechter

Okay. Look in my CR all downloads link in my sig. Download "BigGuns".
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

jecrell

#64
JecsTools - 10-20-17 - CompAbilityUser Update


  • Cooldowns have been largely fixed.
  • New capacity for AI usage of abilities has been opened up.
  • Added some framework for Passive Abilities (will expand upon this further in coming days).
  • Text will now throw on successful castings of mental state givers and hediff giver abilities.
  • TransformedPart hediffs will no longer start bleeding when initialized.

NOTE TO MODDERS:
Change all AbilityDefs from <ThingDef> to <AbilityUser.AbilityDef>

https://github.com/jecrell/JecsTools/releases/tag/1.0.7.0
...Psst. Still there? If you'd like to support
me and my works, do check out my Patreon.
Someday, I could work for RimWorld full time!

https://www.patreon.com/jecrell

kamuii

Will there be an update to this for B18?

CS_Hague

I like the idea of slot attachments and I think that more could be done with them. Could you add something that allows attachments on slotted Things to render on the item itself? For instance: scopes, colored magazines, stocks appearing when slotted in an appropriate weapon. Perhaps you could use the game's current CutoutRender to allow layered textures?

Notably, the game's current version has a bug that prevents multiple pieces of headwear from being worn. If things like eyewear or facemasks can be slotted into other headwear and still be rendered, it would allow people to work around the current bug.

Canute

Jecrell,
could you tell me if this error come from jecstools/vampire maybe ?
When i search the "mods" folder for "LordToilTick" i got 2 mods in result jecstools and hospitality.
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.LordToil_PrisonerEscape.LordToilTick () [0x00000] in <filename unknown>:0
  at Verse.AI.Group.Lord.LordTick () [0x00000] in <filename unknown>:0
  at Verse.AI.Group.LordManager.LordManagerTick () [0x00000] in <filename unknown>:0
  at Verse.Map.MapPostTick () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.Map:MapPostTick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

https://gist.github.com/02da3d64a1dd119f194cd27883d76c66

koni

I just found out that you added the possibility to have shields, Jecrell. Thank you for that ;) . But there is one thing, that doesn't really work: I've forced non-player faction pawns to wield a specific shield via <apparelRequired>. Then testing I've tried to spawn those pawns, which didn't work.

RandomElementByWeight with totalWeight=0 - use TryRandomElementByWeight.
Verse.Log:Error(String)
Verse.GenCollection:RandomElementByWeight(IEnumerable`1, Func`2)
RimWorld.PawnApparelGenerator:GenerateWorkingPossibleApparelSetFor(Pawn, Single, Boolean)
RimWorld.PawnApparelGenerator:GenerateStartingApparelFor(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:GenerateGearFor_Patch1(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawnInternal(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn(PawnKindDef, Faction)
Verse.<DoListingItems_MapTools>c__AnonStorey34:<>m__0()
Verse.DebugTool:DebugToolOnGUI()
Verse.DebugTools:DebugToolsOnGUI()
RimWorld.UIRoot_Play:UIRootOnGUI()
Verse.Root:OnGUI()

Object reference not set to an instance of an object
at RimWorld.ApparelUtility.GenerateLayerGroupPairs (Verse.BodyDef,Verse.ThingDef,System.Action`1<RimWorld.ApparelUtility/LayerGroupPair>) <0x000b9>
at RimWorld.PawnApparelGenerator/PossibleApparelSet.Add (RimWorld.ThingStuffPair) <0x0009e>
at RimWorld.PawnApparelGenerator.GenerateWorkingPossibleApparelSetFor (Verse.Pawn,single,bool) <0x001e8>
at RimWorld.PawnApparelGenerator.GenerateStartingApparelFor (Verse.Pawn,Verse.PawnGenerationRequest) <0x002c2>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateGearFor_Patch1 (Verse.Pawn,Verse.PawnGenerationRequest) <0x0004a>
at Verse.PawnGenerator.GeneratePawnInternal (Verse.PawnGenerationRequest) <0x005b9>
at Verse.PawnGenerator.GeneratePawn (Verse.PawnGenerationRequest) <0x00024>
at Verse.PawnGenerator.GeneratePawn (Verse.PawnKindDef,RimWorld.Faction) <0x00127>
at Verse.Dialog_DebugActionsMenu/<DoListingItems_MapTools>c__AnonStorey34.<>m__0 () <0x00049>
at Verse.DebugTool.DebugToolOnGUI () <0x00072>
at Verse.DebugTools.DebugToolsOnGUI () <0x00020>
at RimWorld.UIRoot_Play.UIRootOnGUI () <0x00178>
at Verse.Root.OnGUI () <0x000c6>

This are the both errors that occurred in the debug log.
I kindly ask you to fix this, or is there another way to spawn them with shields

Ruisuki

Jecrell do you use any mods that use your tools mod? Wondering if you'd recommend any

ChJees

Quote from: koni on February 21, 2018, 08:57:40 AM
I just found out that you added the possibility to have shields, Jecrell. Thank you for that ;) . But there is one thing, that doesn't really work: I've forced non-player faction pawns to wield a specific shield via <apparelRequired>. Then testing I've tried to spawn those pawns, which didn't work.
<snip>
This are the both errors that occurred in the debug log.
I kindly ask you to fix this, or is there another way to spawn them with shields

Simply add this to your PawnKindDef to make them able to spawn with shields. They do not count as apparel.
Code (XML) Select
<modExtensions>
<li Class="PawnShields.ShieldPawnGeneratorProperties">
<shieldMoney>
<min>0</min>
<max>2000</max>
</shieldMoney>
<!-- Looks in weapons for these tags. -->
<shieldTags>
<li>ShieldBasic</li>
</shieldTags>
</li>
</modExtensions>

jecrell

***JecsTools***
1.0.9.5 (3/4/18)
============
+ Added support for a mirror / dual graphic on CompOversizedWeapon, so it appears that a weapon is being dual wielded.
...Psst. Still there? If you'd like to support
me and my works, do check out my Patreon.
Someday, I could work for RimWorld full time!

https://www.patreon.com/jecrell

gana4

Quote from: jecrell on March 04, 2018, 08:36:46 AM
***JecsTools***
1.0.9.5 (3/4/18)
============
+ Added support for a mirror / dual graphic on CompOversizedWeapon, so it appears that a weapon is being dual wielded.

Canute

Translation error i saw in a bug report
Exception loading from translation file [Rimworld_dir]\Mods\D0a-JecsTools-master\Languages\French\Keyed\CompVehicle.xml: System.Xml.XmlException: Expected =, but found � [65533] file:///[Rimworld_dir]/Mods/D0a-JecsTools-master/Languages/French/Keyed/CompVehicle.xml Line 22, position 49.
  at Mono.Xml2.XmlTextReader.ExpectAfterWhitespace (Char c) [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.ReadAttributes (Boolean isXmlDecl) [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.ReadStartTag () [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
  at Mono.Xml.XmlFilterReader.Read () [0x00000] in <filename unknown>:0
  at Mono.Xml.XmlFilterReader.Read () [0x00000] in <filename unknown>:0
  at System.Xml.XmlReader.ReadEndElement () [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XElement.LoadCore (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XNode.ReadFrom (System.Xml.XmlReader r, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XContainer.ReadContentFrom (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XDocument.ReadContent (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XDocument.LoadCore (System.Xml.XmlReader reader, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XDocument.Load (System.String uri, LoadOptions options) [0x00000] in <filename unknown>:0
  at System.Xml.Linq.XDocument.Load (System.String uri) [0x00000] in <filename unknown>:0
  at Verse.DirectXmlLoaderSimple+<ValuesFromXmlFile>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0
at Verse.LoadedLanguage.LoadFromFile_Keyed (System.IO.FileInfo file) [0x00000] in <filename unknown>:0

https://gist.github.com/HugsLibRecordKeeper/ab26d7ce7bc27a859c3a4f8696570cce

clr2299

I have a suggestion/idea, something that's commonly requested/talked about is the ability for "true" shotguns in mods. I'm not sure how you'd want to go about it, but maybe two different setups, one for a projectile with a definable amount of sub projectiles that explode from it instantly, or just multiple projectiles within the same tick. Since these two different methods could be used for a lot more than just shotguns with some imagination i'm sure it would be put to good use.