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

#46
Help / Re: Skills And Weapons
November 06, 2017, 04:28:31 AM
The easy part would be making a weapon give you experience in a skill.

Create a CustomClass : Verb_Shoot and override WarmupComplete() such that base.CasterPawn.skills.Learn(SkillDefOf.Shooting, xp, false); is your chosen SkillDefOf. Assign this verb to the weapon in XML.

Then, harder is making a custom static CustomClass based on ShotReport where HitReportFor() contains f = pawn.GetStatValue(StatDefOf.ShootingAccuracy, true); with your chosen StatDefOf and defining a StatDef (XML) like MagicAccuracy or something and making a StatWorker for the stat so it's influenced by your chosen skill.
#47
Mods / Re: Method for Grid Location 1 Higher
November 06, 2017, 04:18:11 AM
Position is not a struct/class in RimWorld, "new Position(x, y)" isn't used. Instead, IntVec3 is used for cell coordinates.

map.terrainGrid.SetTerrain takes IntVec3 arguments. IntVec3 is structured as (x, y, z) with .y being unused/ignored by methods related to cells, such that taking the map as an XY-plane, IntVec3 is (x, 0, y) for use as cell coordinates.

Since the second argument is never extracted from the IntVec3 (methods check vec.x, vec.z) there's no use in setting it.




Now as a second interpretation, maybe you'd like to get cell (1, 0, 10) from the position (1, 0, 9). In that case:

map.terrainGrid.SetTerrain(base.Position, TerrainDef.Named("TerrainName"));

.. should turn into ..

map.terrainGrid.SetTerrain(base.Position + IntVec3.North, TerrainDef.Named("TerrainName"));

.. since IntVec3 can be added and subtracted, and IntVec3.North = (0, 0, 1).
#48
Very simple combat log suggestion: end every sentence in an exclamation mark.

Also, if the same action happens twice, add "x2" behind the action (and the same for any other multiple of the same action happening).
#49
It works, I was using a folder ThingDefs_Items like the translation folders included with the game, but the folder name should be ThingDefs.
#50
Translations using "<Neurotrainer.comps.1.useLabel>" should of course work. However. When I do actually add this translation to the translation files, nothing happens - not even a warning or error. It seems this is what the major posts on "Translations" do but when you check whether this works in game or not, it actually doesn't do anything.

Easily reproducible by installing language mods, opening the game, switching language, going into a test colony with neurotrainers spawned and right-clicking them. The string is always "Use neurotrainer to learn {0}".

I've got to mention I'm running Rimworld with mods including Hugslib.




Further tests: adding "Neurotrainer.comps.2.useLabel" up to "Neurotrainer.comps.4.useLabel" have no effect either.

Further tests: same effect without any mods.
#51
Quote from: moonra on September 05, 2017, 12:57:37 PM
Is there any way to disable ammo being fired in all directions when it is damaged? I absolutely hate it, that's not how how that works at all.

I'm interested how you suggest damaged ammo should be handled.
#52
Quote from: NoImageAvailable on August 16, 2017, 10:46:15 AM
Quote from: Lupin III on August 15, 2017, 11:59:24 AM
Quote from: rambo on August 15, 2017, 09:30:18 AM
You can look at the description of the gun to know what it it
If you read my comment, that's what I have to do and is exactly the annoying part. If a pistol would just be called "pistol" instead of "M1911" I would not have to do that.

Look at Rimfire to see the problem with that approach. You end up with an armory containing "pistol", "modern pistol", "rimfire pistol" and similar non-descriptors. And what do you do if you have say, an AK-47 and AK-74? "Old Soviet assault rifle" and "Modern Soviet assault rifle"?

With real names at least weapon enthusiasts can tell weapons at a glance and I don't need to waste time on figuring out generic names, while non-enthusiasts will be equally confused by generic and non-generic names.

Jumping in on this post to say that Rimfire has a HugsLib Mod Settings Menu which allows you to switch between generic names and more realistic names which means you can pick whichever naming scheme you prefer (for Vanilla and Rimfire weaponry). Of course this could be extended to other gun mods, and the Rimfire wiki page explains how to do this using the Languages folder (making the method entirely compatible with and without Rimfire active).

I realize downloading Rimfire and adding fifty weapons just to change weapon names can be tedious, so in the mod menu you can also disable each and every Rimfire weapon (you can see the source mod by hovering over a weapon) or even disabling certain CombatExtended weapons if you so please.
#53
Quote from: mathwizi2005 on July 25, 2017, 08:32:23 PM
Could someone explain how bows.....cause suppression?

Wouldn't you duck or run if a volley of arrows passed very nearby where you're standing
#54
Quote from: BlackGyver on January 12, 2017, 06:23:14 AM
Quote from: asquirrel on January 10, 2017, 04:20:19 PM
Quote from: Incendiary Pingu on January 10, 2017, 03:56:21 PM
Quote from: Fafn1r on January 09, 2017, 05:06:28 AM
Damn, you made me forgot about RT Weapons and High Caliber. Rimfire is the only gun mod I need now. The only thing it lacks is a flamethrower. Can we have a flamethrower? :D

I need a flamethrower so much. Imagine the possibilities. That and a taser/stun gun but maybe that's not the same theme as rimfire.

Download Colonial Marines mod.  They have a flamethrower.  Also Ferals in Rimarsenal have a scorcher (flamethrower). 

The problem with the colonial marines mod is that the weapons are not always very well balanced, some are outright preposterous, and the art style for the weapons is a bit lacking (unlike Rimfire's).

I browsed the weapon suggestions, and saw the nonlethal option was (is?) considered, but put off with one of the reasons being some mods already filled that niche, however there are currently no standalone mods for A16 that offer an option like that, and downloading the full Glittertech or Combat realism mods just to get one weapon when you don't care about the rest, well, that's not ideal at all, is it?

This is actually really funny, because I just came to this topic to request *exactly* a flamethrower and a stun gun/taser being considered as additions, so I guess I'm thirding those suggestions! I really need both of these in my life, and what better mod to have them in than this one? Great balance consideration, the art style is coherent and really pretty, and weapons can individually be disabled as desired, it's really the ultimate weapon mod!

I've actually put a little thought in how a nonlethal option could be balanced, and I wonder if making these one-use items (like the vanilla launchers) could be a solution, here?

Thanks for the work you've put in, and I wish your mods a long life!

Due to the results of the weapon addition poll, it's pretty likely there's gonna be a flamethrower added to another Rimfire version. I like the suggestion of making tasers and stun guns one-use items, and of course they can be toggled in the mod menu. For A17 there's probably nonlethal weapon mods out there already, but yeah they could potentially be a good fit for Rimfire.




Quote from: johnarcie009123 on February 06, 2017, 09:09:23 AM
Since this mod is all about weaponry, maybe let's add some apparel? I also think a stationary cannon would be awesome :D

I've recently added a flak vest to Combat Extended; if you're interested in Apparel I'd suggest looking at apparel mods instead. The same for turrets/cannons.




Quote from: 123nick on June 26, 2017, 08:41:58 PM
i heard some weapons are unbalanced- the heavy AMR has double the DPS of the sniper rifle, with less of a cooldown and warm up, and is sorta cheap for late game standards. maybe if vastly increased its warmup/cooldown time like warmup of 5, and cooldown of 4, or warmup of 6 , so its a lot longer between shots, and double the cost of plasteel and steel for it, and maybe add other, rarer components for crafting (like maybe a bionic eye for lenses, or uranium/gold for, idk, the glowing sights? fancy embellishments? some ingame reason to explain it :P)

For A17 the cooldown and warmup were increased and its commonality was decreased due to the RimWorld Discord mentioning how raiders with AM rifles were overpowered. Crafting costs remained the same for v2.3 but feel free to suggest crafting cost values for v2.3.1(?).
#55
Quote from: MrZero on June 29, 2017, 11:32:07 PM
you sir, have the most high quality, mastercrafted, badass and lore friendlish weapon mod in the whole community.
rimworld firefights are not the same without our mod

Quote from: kaptain_kavern on June 29, 2017, 11:03:46 AM
Awesome. You rocks

Thank you guys very much, I hope you enjoy the latest update and feel free to suggest any changes too.




Quote from: admiralKew on June 29, 2017, 07:37:50 PM
So awesome to see Rimfire updated! I noticed upon loading that it looks at the CE, CE Guns, and VFWE weapons expansions as well. Is this version of Rimfire compatible with CE out of the box as well?

Sadly it is not. Rimfire looks at Combat Extended Guns, GaussWeapons, 20th Century Weapons Mod, High Caliber, LaserWeapons, Medieval Times, Project Fallout v1.5, RT's Weapon Pack and Vanilla-Friendly Weapon Expansion for categorizing each of their weapons into the categories present in the gun mod menu (using HugsLib 3.1.2+, it can be found in the Settings>Mod Settings menu). Also MiscHands is patched to use visible hands on the Rimfire guns.

A CE patch is not planned. I assume at some point there will be a Rimfire CE patch in Combat Extended, provided by someone else or if I feel like working on the patch after working on some other projects it might be added to CE by me. I would have copied over the Combat Realism patch 1:1 from A16 but there are new guidelines for creating patches now which I'm sure that version does not abide to.

A patch has been added to Combat Extended in A17+
#56
Outdated / Re: [A17] Mod Announcements Thread
June 29, 2017, 10:13:15 AM
Rimfire v2.3
https://ludeon.com/forums/index.php?topic=9536.0

Not released on Steam

Adds fourty-eight weapons to Rimworld along with a gun toggling menu (HugsLib 3.1.2+).
#57
Rimfire v2.3 for Alpha 17 released!

Rimfire has been updated to A17. A HugsLib configuration menu can still be found under Settings, Mod Settings with HugsLib 3.1.2+ enabled and now it has been stylized a bit more! You'll find icons for all guns in the list and on mouse-over you will see the mod that had added the weapon. Furthermore, several weapon mods are patched automatically to neatly categorize into the mod settings menu. The categories show how many of their thingdefs are enabled and finally, if you are missing any weapontags, suggested guns to activate are highlighted in red. You can now also click in a larger area around each list item to enable or disable the gun. Disabled weapons are displayed greyed out. Mousing over a list item increases its size so you're better able to tell weapons apart. I am also happy to announce that the error prevention system (to prevent pawns from spawning without any weapons due to players disabling guns from the menu) is much more robust.


The Misc Hands mod is also added as a patch, so players with Misc Hands active will now automatically find their pawns to show their hands on the weapons without the need for an additional mod in the load order:


Finally, the commonality of antimateriel rifles has been decreased 10 to 100-fold, and warmup + cooldown were increased to total about 8 seconds from the previous 6.




Thanks for reading the update, enjoy Rimfire v2.3!
~ Alistaire
#58
CompProperties_Usable uses a "useLabel" instead of a "useKey", CompProperties_Schedule uses a "offMessage" instead of a "offKey":

// RimWorld.CompProperties_Usable
public string useLabel;

// RimWorld.CompProperties_Schedule
public string offMessage;


Which is then displayed as such:

// RimWorld.CompUsable
protected virtual string FloatMenuOptionLabel
{
get
{
return this.Props.useLabel;
}
}

// RimWorld.CompSchedule
public override string CompInspectStringExtra()
{
if (!this.Allowed)
{
return this.Props.offMessage;
}
return null;
}


Which means that useLabel/offMessage can not be translated into other languages.




Suggested solution

// RimWorld.CompProperties_Usable
public string useKey;

// RimWorld.CompProperties_Schedule
public string offKey;


// RimWorld.CompUsable
protected virtual string FloatMenuOptionLabel
{
get
{
return this.Props.useKey.Translate();
}
}

// RimWorld.CompSchedule
public override string CompInspectStringExtra()
{
if (!this.Allowed)
{
return this.Props.offKey.Translate();
}
return null;
}


// RimWorld1557Win\Mods\Core\Languages\English\Keyed\Misc_Gameplay.xml

  <!-- Comps -->
  <UseLabel_Neurotrainer>Use neurotrainer to learn {0}</UseLabel_Neurotrainer>
  <UseLabel_Artifact>Activate</UseLabel_Artifact>

  <OffMessage_SunLamp>Off for plant resting period</OffMessage_SunLamp>
#59
It appears that props.explosiveExpandPerStackcount has no effect on explosion size. This is because of the following lines:

// RimWorld.CompExplosive
///protected void Detonate(Map map)

(..)

if (!this.parent.Destroyed)
{
this.parent.Kill(null);
}

(..)

float num = props.explosiveRadius;
if (this.parent.stackCount > 1 && props.explosiveExpandPerStackcount > 0f)
{
num += Mathf.Sqrt((float)(this.parent.stackCount - 1) * props.explosiveExpandPerStackcount);
}

(..)


Which causes the following to happen. Since this.parent.Kill(null), parent.stackCount = 0. Therefore, regardless of props.explosiveExpandPerStackcount, the explosion radius will be props.explosiveRadius.

Furthermore, there's a check for this.parent further down in the code (which may or may not have problems triggering because of the earlier killed parent).




Suggested solution:

Create Thing instigatorThing = this.instigator ?? this.parent; and num before killing the parent such that these values are not null.

// RimWorld.CompExplosive
protected void Detonate(Map map)
{
if (this.detonated)
{
return;
}
this.detonated = true;
if (!this.parent.SpawnedOrAnyParentSpawned)
{
return;
}
if (map == null)
{
Log.Warning("Tried to detonate CompExplosive in a null map.");
return;
}
CompProperties_Explosive props = this.Props;
float num = props.explosiveRadius;
if (this.parent.stackCount > 1 && props.explosiveExpandPerStackcount > 0f)
{
num += Mathf.Sqrt((float)(this.parent.stackCount - 1) * props.explosiveExpandPerStackcount);
}
Thing instigatorThing = this.instigator ?? this.parent;
if (!this.parent.Destroyed)
{
this.parent.Kill(null);
}
if (props.explosionEffect != null)
{
Effecter effecter = props.explosionEffect.Spawn();
effecter.Trigger(new TargetInfo(this.parent.PositionHeld, map, false), new TargetInfo(this.parent.PositionHeld, map, false));
effecter.Cleanup();
}
ThingDef postExplosionSpawnThingDef = props.postExplosionSpawnThingDef;
float postExplosionSpawnChance = props.postExplosionSpawnChance;
int postExplosionSpawnThingCount = props.postExplosionSpawnThingCount;
GenExplosion.DoExplosion(this.parent.PositionHeld, map, num, props.explosiveDamageType, instigatorThing, null, null, null, postExplosionSpawnThingDef, postExplosionSpawnChance, postExplosionSpawnThingCount, props.applyDamageToExplosionCellsNeighbors, props.preExplosionSpawnThingDef, props.preExplosionSpawnChance, props.preExplosionSpawnThingCount);
}
#60
Help / Re: I could use some help with mod creation.
June 28, 2017, 05:29:24 PM
A bunch of these require XML for the InteractionDef and some C# code for the InteractionWorker. A very doable first mod, I doubt you need a lot of coding experience to put these ideas into code.

RimWorld1557Win\Mods\Core\Defs\InteractionDefs\Interactions_Social.xml contains a bunch of core game interactions.

RimWorld.Pawn_InteractionsTracker.TryInteractRandomly() allows any new InteractionDef to be randomly picked, including your suggestions.

RimWorld.InteractionWorker derived classes are really simple to create - initiator and recipient are supplied so you can do whatever checking of traits you want.

All InteractionDefs can be xpatched to have a new InteractionWorker of your choosing such that you can change the base game romance attempts to check whether the rebuffed pawn is friendzoned.