Adding extra gunner position

  • 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

otester

FNG / Fresh Meat
Mar 7, 2006
366
5
0
Basically at the moment there is:

(1) Scope.
(2) Inside cupola.
(3) Outside cupola.
(4) Binocs.


I want to add a 5th, how can I do this? I have looked for arrays in the code and when changing the locations recompiling, nothing changes so I am lost and not sure where to add my position to?

Any ideas on where to look or am I in the wrong place? :confused:
 

Amizaur

FNG / Fresh Meat
Aug 18, 2006
275
3
0
44
Gdansk, Poland
I interpreted it wrong first, thought you want to add a new player station in the turret.

Obviously you are doing something wrong ;) but not sure what. The addition of second binocular view didn't need any superclass modifications, probably adding new station between gunsight and binocs wouldn't either (beside changing one variable). But the number of some stations is hard coded in some major superclass (ROTankCannonPawn IIRC). Not sure what do you want to do and add. In worst case you would have either to subclass it modifying two functions from there (like I did) and make all tank cannonpawns subclasses of your new class, or put those two modified functions (replacing them) in your tank's cannonpawn class - which is more safe I think when you are making only one tank. About what to change in those functions - well you have to analyse the code yourself, because I'm not sure what do you want to add and in what place... You can decompile AB code and take a look into AB_RO_TankCannonPawn class to see what I have changed to add second gunsight magnification.

BTW what do you want to add and in what place ? Maybe on PM if it's a secret :)

P.S. OK reading it again I think you want to add something at 6th place after the binocs ? (first I thought 6th view but was not sure at what place). Well everything beside binocs would have binocs overlay and it's hard coded in superclass, as I wrote above. So I think you'd have to make similar modifications like I did adding second gunsight zoom, and like I will have adding second different gunsight (to have both telescopic and periscopic).
Not even sure at the moment if you can disable the overlay, it should be possible (bDrawOverlays=true to false) but that is all you can change without editing superclasses. Even to change the overlay texture you have to edit (subclass) TankCannonPawn class. As for new animations ect. - I have no clue how it's done (I mean imported into ROEd and put all together), would like to know too - for example add anim of going from telescopic to periscopic sight or going from periscopic to commader's periscope in Russian tanks (hmmm around the gun breach ??? ;) ) and then to cupola :).

P.S.2. Maybe you could end with subclassing only the DrawBinocOverlay function in your tank's cannonpawn - and make the modifications of your new station there, taking a look into ROtankcannonpawn for reference. It wouldn't be an elegant solution me thinks... But maybe effective (in regard to how much code and how many fuctions are modified) if it's just for one tank...

I have thought about rewriting the whole part of RO code responsible for views and drawing of gunsight/binocs in AB, to allow for changing the overlay texture and some other things just by modifing the DriverPositionsNew(x) chain (add variables for the type of view, texture ect, it could maybe even lead to custom functions if it's possible, for future unexpected modifications) - then such modifications like yours would be trivial - but it's a song of the future for now...

PM if you needs something specific but I'm available only weekends so today, tommorow I'm out again...
 
Last edited: