• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

RS Adding Weapons (M2 Carbine) to classes

dibbler67

FNG / Fresh Meat
Sep 4, 2011
654
6
0
Texas
No it definitely was an M1, I even fired it...

Anyways, yes, I just realized that it does, I'll go test it again.
And it did not work I changed the references in RSWeapAttach_M2_Carbine & RSWeap_M2_Carbine to ROWeaponAttachment & RSProjectileWeapon respectively.
Did you copy all of the code from RSWeap_M1_Carbine into your new class and change what was necessary?

Did you do the same with RSWeapAttach_M1_Carbine?

Does your content class extend RSWeap_M2_Carbine?

Does the WeaponContentClass array point to RSWeap_M2_Carbine_Content in all its entries? (or level classes)

Here's what my rifleman class looks like. The game's system is a bit unintuitive. Try copying this block and substituting your weapons for mine; this should insure that there's only one weapon the role can have for testing purposes.

Code:
class SMRoleInfoAxisRifleman extends RORoleInfoAxisRifleman;

defaultproperties
{
	NumPrimaryVeteranEnemyWeapons=0
	NumPrimaryVeteranWeapons=1
	NumPrimaryHeroEnemyWeapons=0
	NumPrimaryUnlimitedWeapons=0
	
	PrimaryWeapons.Empty
	
	bHasEarlyUnlockPrimaryWeapons=true

	PrimaryWeapons(0)=class'SoundMutator.ROWeap_Kar98_Rifle_Wartorn'
	PrimaryWeapons(1)=class'SoundMutator.ROWeap_Kar98_Rifle_Hoodless_Wartorn'
	
	SecondaryWeapons.Empty
	
	bAllowPistolsInRealism=true
	bHasEarlyUnlockSecondaryWeapons=true
	NumSecondaryHeroEnemyWeapons=0
        NumSecondarySoldierWeapons=0
	
	SecondaryWeapons(0)=class'SoundMutator.ROWeap_M1939_Grenade_SM_Rifleman'
	SecondaryWeapons(1)=class'SoundMutator.ROWeap_M39_Eihandgranate_Rifleman'
	
	OtherItems.Empty
	
	OpposingTeamEquivalentClass=class'SoundMutator.SMRoleInfoAlliesRifleman'
}
 

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,560
59
48
Baltimore, Maryland
steamcommunity.com
Did you copy all of the code from RSWeap_M1_Carbine into your new class and change what was necessary?

Did you do the same with RSWeapAttach_M1_Carbine?

Does your content class extend RSWeap_M2_Carbine?

Does the WeaponContentClass array point to RSWeap_M2_Carbine_Content in all its entries? (or level classes)

Here's what my rifleman class looks like. The game's system is a bit unintuitive. Try copying this block and substituting your weapons for mine; this should insure that there's only one weapon the role can have for testing purposes.

Code:
class SMRoleInfoAxisRifleman extends RORoleInfoAxisRifleman;

defaultproperties
{
	NumPrimaryVeteranEnemyWeapons=0
	NumPrimaryVeteranWeapons=1
	NumPrimaryHeroEnemyWeapons=0
	NumPrimaryUnlimitedWeapons=0
	
	PrimaryWeapons.Empty
	
	bHasEarlyUnlockPrimaryWeapons=true

	PrimaryWeapons(0)=class'SoundMutator.ROWeap_Kar98_Rifle_Wartorn'
	PrimaryWeapons(1)=class'SoundMutator.ROWeap_Kar98_Rifle_Hoodless_Wartorn'
	
	SecondaryWeapons.Empty
	
	bAllowPistolsInRealism=true
	bHasEarlyUnlockSecondaryWeapons=true
	NumSecondaryHeroEnemyWeapons=0
        NumSecondarySoldierWeapons=0
	
	SecondaryWeapons(0)=class'SoundMutator.ROWeap_M1939_Grenade_SM_Rifleman'
	SecondaryWeapons(1)=class'SoundMutator.ROWeap_M39_Eihandgranate_Rifleman'
	
	OtherItems.Empty
	
	OpposingTeamEquivalentClass=class'SoundMutator.SMRoleInfoAlliesRifleman'
}
do I need your Sound Mutator for this?
 

dibbler67

FNG / Fresh Meat
Sep 4, 2011
654
6
0
Texas
do I need your Sound Mutator for this?

No, I'm suggesting you replace those references with yours. Then only one weapon can be selectable by that role, and you will know if the role is being properly swapped or if the weapon isn't being loaded etc.


Edit: Make it look like this:


Code:
defaultproperties
{
	NumPrimaryVeteranEnemyWeapons=0
	NumPrimaryVeteranWeapons=1
	NumPrimaryHeroEnemyWeapons=0
	NumPrimaryUnlimitedWeapons=0
	
	PrimaryWeapons.Empty
	
	bHasEarlyUnlockPrimaryWeapons=true

	PrimaryWeapons(0)=class'YourPackage.YourClass'
 
	SecondaryWeapons.Empty 
	OtherItems.Empty
 
}
 
Last edited:

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,560
59
48
Baltimore, Maryland
steamcommunity.com
I tried it, and it didn't work, I think it might have to do with extending the roles to the original classes ie "RSRoleInfoCommander_Mk2 extends to RSRoleInfoCommander"
Mainly because I tried this, and it gave me all the weapons I'd normally have without the mutator, the M1 was an M1, and it didn't delete any of the items or weapons :(
 

dibbler67

FNG / Fresh Meat
Sep 4, 2011
654
6
0
Texas
I tried it, and it didn't work, I think it might have to do with extending the roles to the original classes ie "RSRoleInfoCommander_Mk2 extends to RSRoleInfoCommander"
Mainly because I tried this, and it gave me all the weapons I'd normally have without the mutator, the M1 was an M1, and it didn't delete any of the items or weapons :(
Can you post the role class here? It should have gotten rid of everything even if it does extend the old role. It sounds like the role isn't being placed.

Have you brewed your map copy or are you using -useunpublished?
 

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,560
59
48
Baltimore, Maryland
steamcommunity.com
Can you post the role class here? It should have gotten rid of everything even if it does extend the old role. It sounds like the role isn't being placed.

Have you brewed your map copy or are you using -useunpublished?
I've re-brewed both of them, anyways here's the code for the US SL:
class RSRoleInfoAlliedCommander_Mk2 extends RSRoleInfoAlliedCommander;


class RSRoleInfoAlliedSquadLeader_Mk2 extends RSRoleInfoAlliedSquadLeader;

defaultproperties
{
RoleType=RORIT_SquadLeader
ClassTier=3
ClassIndex=`RSRI_RSRoleInfoAlliedSquadLeader

NumPrimaryVeteranEnemyWeapons=0
NumPrimaryVeteranWeapons=1
NumPrimaryHeroEnemyWeapons=0
NumPrimaryUnlimitedWeapons=0

PrimaryWeapons.Empty

bHasEarlyUnlockPrimaryWeapons=true

PrimaryWeapons(0)=class'MutM2Carbine.RSWeap_M2_Carbine'

SecondaryWeapons.Empty
OtherItems.Empty

OpposingTeamEquivalentClass=class'MutM2Carbine.RSRoleInfoAxisSquadLeader_Mk2'
ClassicModeOverrideClass=class'MutM2Carbine.RSRoleInfoCLAlliedSquadLeader_Mk2'
ClassicEarlyWarOverrideClass=class'MutM2Carbine.RSRoleInfoCLEWAlliedSquadLeader_Mk2'
EarlyWarOverrideClass=class'MutM2Carbine.RSRoleInfoEWAlliedSquadLeader_Mk2'

bIsSquadLeader=true
}
And it's not a spelling mistake with Carbine, it's the forums glitching again.....
 
Last edited:

dibbler67

FNG / Fresh Meat
Sep 4, 2011
654
6
0
Texas
Why are there two class definitions in your code? Or is that implying that they're identical?

I don't think that your map changes are taking.

Brewed, not just built? Have you tried copying the map from unpublished and putting it in published?
 
Last edited:

nymets1104

Active member
Dec 18, 2012
2,433
24
38
USA
Code:
ClassIndex=`RSRI_RSRoleInfoAlliedSquadLeader
Is this missing a quote or was it a typo?
 

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,560
59
48
Baltimore, Maryland
steamcommunity.com
Why are there two class definitions in your code? Or is that implying one they're identical?

I don't think that your map changes are taking.

Brewed, not just built? Have you tried copying the map from unpublished and putting it in published?
Oops, that's actually my mistake, while writing the post I accident;y copied the Commander's info, rather than the SL, I thought I selected it all and pasted over it and I guess I didn't...
ClassIndex=`RSRI_RSRoleInfoAlliedSquadLeader is valid As far as I know, I actually originally tried changing it, but the build process failed, so it can't be a typo, further more it's in every role class. I don't honestly know why it's there. I think the the ClassIndex reference itself may be the problem (not positive, but a possibility) but I can't seem to figure out where that reference comes from and edit it. It would explain why I would only be able to get weapons from the original class, and not the inserted M2, I guess. I'll do a run down of the game's source, later today, I'll see if it is or is not.
 
Last edited:

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,560
59
48
Baltimore, Maryland
steamcommunity.com
Oops, that's actually my mistake, while writing the post I accident;y copied the Commander's info, rather than the SL, I thought I selected it all and pasted over it and I guess I didn't...
ClassIndex=`RSRI_RSRoleInfoAlliedSquadLeader is valid As far as I know, I actually originally tried changing it, but the build process failed, so it can't be a typo, further more it's in every role class. I don't honestly know why it's there. I think the the ClassIndex reference itself may be the problem (not positive, but a possibility) but I can't seem to figure out where that reference comes from and edit it. It would explain why I would only be able to get weapons from the original class, and not the inserted M2, I guess. I'll do a run down of the game's source, later today, I'll see if it is or is not.
What exactly do I need to edit in the RSMapInfo & RSRoleInfo?
 

dibbler67

FNG / Fresh Meat
Sep 4, 2011
654
6
0
Texas
`RSRI_RSRoleInfoAlliedSquadLeader is a macro; the compiler's preprocessor simplifies this one to an enum value I believe. This happens at compile time.
 

dibbler67

FNG / Fresh Meat
Sep 4, 2011
654
6
0
Texas
Hmm, so I'm not sure what's wrong, dibbler do you have any Ideas?
You gotta find the Roles in the level's map info.

I think it's View -> World Properties -> Map Info -> RSMapInfo -> TEAllies in the editor.

If you know what I mean and you've already done that, the problem may be that your map isn't the one being loaded for some reason.
 

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,560
59
48
Baltimore, Maryland
steamcommunity.com
You gotta find the Roles in the level's map info.

I think it's View -> World Properties -> Map Info -> RSMapInfo -> TEAllies in the editor.

If you know what I mean and you've already done that, the problem may be that your map isn't the one being loaded for some reason.
hmmm, I brewed it and built it, and added the roles multiple times, in fact I've selected it in the game, however let me what happens if I modify something or play it in the editor
 

dibbler67

FNG / Fresh Meat
Sep 4, 2011
654
6
0
Texas
You need to create a localization file. (.INT)

MutM2Carbine.int

Code:
[RSRoleInfoAlliedCommander_Mk2]
MyName="Commander"
ClassShortName="Cmdr"
Description="blahblahblah"


[RSWeap_M2_Carbine]
DisplayName="M2 Carbine"
CapitalizedDisplayName="M2 Carbine"
Description="blahblahblah"
The description is not used IIRC. Place this in C:\Users\<name>\Documents\My Games\RedOrchestra2\ROGame\Localization\INT

Different languages have different file extensions and go in different directories within the Localization directory. ".int" is the catch-all
 
Last edited: