• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Rifle stats

Hi Jack Rackham,

If you leave me a note on what needs to be done for the model thing you mention, I am happy to do it tomorrow when I am allowed once again. ;) (but I would need instruction, so it might be easier for someone else to do if they don't want to spend time explaining to me, either way works)

The scope still lets you do the Free Aiming mode thing. That's all it currently does in the Woodes Rogers version of the rifle with and without scope listed in that file, and it seems enough. (the LongRifle_W and LongRifle_WT have the same stats)

Essentially, if the player takes time to use the scope and aim manually, then he gets a big benefit, but normal shooting doesn't become more accurate by having the scope attached. Doesn't matter for NPCs, since this is a player only 1 time item.

Seems sensible?

(ok, time to stop sneaking and rejoin my wife, my luck skill isn't that high in real life. ;) )
 
Doesn't the scope make it change into another type of rifle altogether now?

Anyway, search for "LongRifle_C" in the game files.
 
My wife gave me permision to finish this up real quick. ;) New rar file attached, 10 total files, someone should check my work but I think it should have what is needed now, I searched all files as Pieter instructed.

Pieter, yes, it turns it into LongRifle_CT. Before I equalized their stats, LongRifle_C had 20 accuracy, and 50-150 damage, and was a terrible weapon. Basically someone made it so the scope was required for the rifle to be an ok weapon, and it was far worse than all the quest rifles, and worse than a musket in every respect.

Meaning up until now Hornblower's riflemen had AWFUL weapons, because they were using the LongRifle_C. I am fairly certain that was an unintentional bug. ;) In either this version or the save game compatible item file I posted in the other thread the bug is largely fixed, because the stats are much improved even in the LongRifle_C, but here where they get LongRifle_H they get the slightly better Baker Rifle (with Grey Roger's proposed stats, accuracy 120 and damage 150-250)

So I moved LongRifle_C's stats up to the proper LongRifle_CT, and then modified to make it strategically interesting using that as a base.

The scope still gives the free aiming capability, otherwise, the damage and function is identical now, like with the quest versions. Baker Rifle does not get scope functionality though, didn't seem needed given the scope is a one-time quest item designed for that specific quest rifle.

And LongRifle_H should now appear as a random item in Napaleonic, rather than just being a one time quest item.

Notes to new file edits:

By the way, noticed in seadogs.c that one of these is commented out, the other is not, confused why since longrifle_C and longrifle_W are equivalent in this respect? Didn't know whether to make one for longrifle_H since it is commented out for LongRifle_C.

/*
if(IsEquipCharacterByItem(Pchar, "LongRifle_C"))
{
if(LAi_IsFightMode(PChar))
{
LAi_QuestDelay("place_LR_C_on_back", 1.0);
}
else
{
LAi_QuestDelay("place_LR_C_on_hip", 1.0);
}
}
*/
if(IsEquipCharacterByItem(Pchar, "LongRifle_W"))
{
if(LAi_IsFightMode(PChar))
{
LAi_QuestDelay("place_LR_W_on_back", 1.0);
}
else
{
LAi_QuestDelay("place_LR_W_on_hip", 1.0);
}
}
}



I also didn't add it here in LAI_init, because it looks like it would remove it from being randomly placed, and we want it in napoleonic period:
if(GetCurrentPeriod() >= PERIOD_GOLDEN_AGE_OF_PIRACY)
{
if(gunID2 == "pistolmket" || gunID2 == "pistolmtoon" || gunID2 == "pistol10" || gunID2 == "LongRifle_C" || gunID2 == "LongRifle_CT")
{
right_gun = "pistolbbuss";
}
 
Last edited:
Longrifle_W and _WT (for WoodesRogers later on) has not been fixed with at all.
Not sure about the outcommented block in seadogs.c. Guess it's an older version.

For the model switch:
It's executed in quests_common.c
and directed here from LAi_events.c, seadogs.c maybe items.c. Maybe more files.
You have to search all PROGRAM files for whenever "longrifle_C" shows up.

Are you using the same models for longrifle_H as for longrifle_C?
As there will be no telescope case for the new longrifle_H it gets a little easier.

If it doesn't work out well I'll try to help. Will be away from home thursday - monday again though.
 
Hi Pieter,

I have no opinion really on the scope improving accuracy, and am glad to edit in an accuracy boost if you think it sensible. I didn't like it when no scope meant only 20 total accuracy and 100 less damage, so I moved the no scope stats up to a reasonable 80 accuracy and same damage (80 allows it to best a musket in accuracy slightly, as a rifle should, even with the barrel cleaning issues of the early rifles messing up accuracy).

I personally think no accuracy boost is fine, because using the scope is modeled by using free aiming mode, which is already very accurate, and I think with the early rifles, it is the barrel cleaning issues and such that are limiting accuracy, more than the aiming itself, so it is reasonable for the long rifle even with a scope to be less than perfectly accurate. But this is a player only Easter egg type quest, and one I don't even personally plan on using. So I have no real opinion.

Do we then want the scope version to be 100 or 120 accuracy, versus the base 80 for the long rifle? The baker rifle is already 120, at Grey Roger's suggestion, for comparison, but of course that version gets no scope.

Let me know if so, and I'll edit it and reupload in the other thread (since the item file here is only included merge the new hornblower/napoleonic rifle (will probably fall out of date in other ways over time), and it has no scope).
 
Last edited:
@Jack Rackham

I think I covered the files you mention (there are 10 edited files in that rar archive, including 4 covering model switches I think, and I did do a Windows search and think I found all the relevant mentions). The only ones I didn't add are the two blocks of code I posted above, for the reasons mentioned, like the Lai init file (assuming I am right and that would replace the item, which we don't want since we want it to be randomly available).

Yes, same model for both rifles.

I would love if you could check my work though when you get back, and see if I missed or messed up anything. :)
 
For reference, we currently have implemented

Baker rifle, 120 accuracy, 150-250 damage, 1pb per shot, 50 reload time.
Set to appear as random item in napoleonic, and also set for all the hornblower storyline.

Long rifle, 80 accuracy, 150-200 damage, 1pb per shot, 50 reload time
quest only one time player item, no random appearance.

Long rifle scope, same stats, but free aiming ability

@Grey Roger, you mentioned +40 accuracy for scope in your previous post, do you want to move it up to 120, or some other number? Or do you think free aiming ability covers it? Anything you prefer makes sense to me.
 
+40 is fine by me. If the basic rifle is accuracy 80 then yes, that would give the rifle with telescopic sight 120.
 
I would love if you could check my work though when you get back, and see if I missed or messed up anything.
Please test it by giving yourself the new rifle and ammo and fire etc etc to see if it switches ok from hip to back.
I'll promise to try to help if it's not working.
 
Reuploading file with all the latest updates
 

Attachments

  • new rifle.rar
    214.1 KB · Views: 197
Last edited:
@Jack Rackham

Hornblower riflemen have the item, it shows up fine, shoot fine, stats correct.

But the hip to back part of it doesn't work, it always stays on back.

Not sure why--I thought I had copied over all the parts in all the files correctly. Ran a second windows search, couldn't find anything missing.

Guess we will need your experitise to finish this one up, when you get a chance. I have put the most updated rar archive above, I am sure I just did something stupid that kept it from working.

Thanks! :)
 
Back
Top