Home   Help Search Login Register  

Author Topic: units with selectable rank (displayed ingame)  (Read 1726 times)

0 Members and 1 Guest are viewing this topic.

SgtSlick

  • Guest
units with selectable rank (displayed ingame)
« on: 11 Jun 2006, 20:04:11 »
I'm surprised to see that this hasn't been created yet. A unit where you choose the rank of the unit and all appropriate changes will be made on the uniform. So you can just walk up to the unit ingame and actually see that the unit is a captain, or sergeant, or anything you want it to be. I'm sure this won't be too hard.

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re: units with selectable rank (displayed ingame)
« Reply #1 on: 20 Jun 2006, 15:37:52 »
is there a getrank - command? don't think so, therefore it should be hard to implement
we're looking for members: IM:UC MOD

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: units with selectable rank (displayed ingame)
« Reply #2 on: 20 Jun 2006, 17:03:47 »
Well, it is possible...

For example FDF mod (IIRC) contains setObjectTextureable rank patches which you can set manually (in the mission editor or in a script) on a soldier, but of course that doesn't change according to the unit's rank (set in the editor)..

getRank function can be written, and I was writing such when I stumbled on some problems, and lack of time to solve them..
The problems were just with the method of storing the unit's default rating (the method is a whole other topic, UNN has later 'mastered' that with his get/setInteger functions etc..)) and if would have used some easier solution the function would have worked just fine..
UNN uses a basic version of the getRank function in some of his work..

Anyway, the ranks are based on units rating..
Each rank has a default rating value defined in OFP's main config and based on those values you can build a table of values which you can then crosscheck with the unit's rating and get the units rank...

With every kill (enemy or friendly) the unit's rating changes, so if you only check the unit's rating and base your rank on that you may get faulty results, depending of course when you use the function... With the situ in guestion this should not be a problem at all..
Someone who starts a mission as private could become a colonel in the course of the mission if he/she scores enough enemy kills..
Ok, that's fairly easy to overcome, you just check each units rating at the start of the mission and save their ranks (based on the ratings) somewhere..

With vehicles the rank you set in the editor acts a bit screwy, can't remember what exactly it was..
I think the rank was a bit weirdly 'distributed' in the vehicle, the rank you give for the vehicle in the editor is actually the driver's rank and the rest of the crew are exponentially higher ranks..
That's not a problem either, you just check the vehicle' (ie. the dirver's) rating and based on that give the driver his/her rank, and then give the rest of the crew higher ranks, like if the driver is private, then the gunner is corporal and the commander is sergeant..

Of course you would then need a soldier model on which you have the required selections to setObjectTexture the correct rank patch..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline BigDawgKS

  • Members
  • *
Re: units with selectable rank (displayed ingame)
« Reply #3 on: 21 Jul 2006, 19:31:37 »
is there a getrank - command? don't think so, therefore it should be hard to implement

There will be in ArmA.