Announcement

Collapse

Forum Rules

CHANGES
  • Items changed, or highlighted for future attention, on 20 July 2013 are highlighted in yellow.
Global Rules
  • Forum moderators may or may not be Tripwire Interactive staff members, but either way, please respect them, as they are the authority of the forums. Speaking to them with intentional spite will not be tolerated and may result in the loss of your forum privileges.
  • Any decisions made by any member of staff or moderator are final and not subject to discussion. Doing so may result in a ban from the site. The owners of Tripwire Interactive Forums reserve the right to remove, edit, move or close any thread for any reason, as well as to remove access to the forums for any individuals with or without warning for breaches of the rules.
  • If you have a complaint regarding another user, PM the appropriate moderators, or if you have an administrative issue, [RO]schneidzekk.
General Behaviour
  • Use the search function before posting. Chances are your question has already been answered.
  • Use a title that describes the content of your post. Don't use all caps or special characters to draw attention either in the title or the body of the post.
  • Up to 10 emoticons are allowed in a post
  • Political discussions are prohibited.
  • Flaming - We do not tolerate abusive, malicious, personal attacks. You will be banned if you persist in this behavior.
  • Trolls - Anyone deliberately antagonizing other forum users by posting 'flame bait' type messages is not welcome. You will be banned (possibly without warning depending on the severity of the issue) if you persist in this behavior.
  • Personal insults (directed at anyone) will result in a ban. If the behavior is not corrected, it will be made more permanent.
  • Constructive criticism is welcome. However keep in mind we (and other forums goers) may not agree with you. If you can't keep the conversation civil, you will be removed from the forums.
  • The use of hyperbole, one liners, and images as part of a forum debate is likely to get you infracted. You have many ways to participate and be a constructive part of this community, even when you disagree.
  • To make the highlighted bits above 100% clear to everyone, the following WILL NOT BE TOLERATED:
    1. Personal attacks, insults, antagonism of any forum-goers, moderators or Tripwire Interactive staff.
    2. Breaches of confidentiality and privacy of any sort.
    3. Any form of racism, bigotry or attacks on race, creed or color.
    4. Linking to posts on other forums related to ANY of the above, whether you are the originator or not, without exception.
  • There has been too much in the way of abhorrent personal behaviors in the past. These will cease. It doesn't matter who started it or who reacted to it - it will all result in moderator action. If you have to indulge your hatreds, for whatever reason, go do it elsewhere - and do not try and drag our forum-goers over to enjoy your hatreds.
  • We understand that people have strong feelings about our games, what we do for a living and how we respond (or don't) to comments on the forums. We all aren't going to agree about everything. So, BE CIVIL in your disagreements!
DO NOTs
  • DO NOT Transmit any message, information, data, text, software or graphic files, or other materials ("Content") that is unlawful (including illegal drug usage), harmful, threatening, abusive, harassing, defamatory, vulgar, obscene, libelous, hateful or racially, ethnically, sexually or otherwise objectionable. This includes publicizing private information, such as individual's real names, IP addresses and anything else that might be used to identify them to the freakier members of the internet. This also means you may NOT publically share private communications (PM, email or anything else) without the original poster's permission.
  • DO NOT Post or transmit any Content that contains a virus, Trojan horse or other mischievous Content.
  • DO NOT Post or transmit any unsolicited advertising, promotional materials, "junk mail", "spam", "chain letters", "pyramid schemes" or any other form of solicitation.
  • DO NOT link to posts on any other forums, or any other form of media, that breaches our rules. It will be treated just the same as if you had posted it here.
  • DO NOT Double Post, cross Post or restart closed threads.
  • DO NOT Intentionally or unintentionally violate any applicable local, state, national or international law, rule or regulation.
  • DO NOT Upload or transmit any Content that infringes any patent, trademark, trade secret, copyright or other proprietary rights ("Rights") of any party.
  • DO NOT post cheats or exploits; THIS INCLUDES ALL/ANY REFERENCES TO HACKING, PIRATED SOFTWARE etc.
  • DO NOT complain about being banned from a server and DO NOT complain about other players on servers - that is between you and the admin, no need to get the community involved.
Username, Avatar and Signature Rules
  • Multiple registrations result in a ban.
  • No offensive user names
  • Avatars:
    Avatars are disabled.
  • All signatures should not exceed the following size limits, you can have both text and images
  • - For text signatures: 4 lines normal size, 8 lines small size and up to 100 chars per line. Font sizes above 2 are not allowed. (Blank lines count as lines.)
  • - For images in signatures: 1 image up to 400 pixels wide, 150 pixels tall and 100kb in size plus 2 lines normal size text and up to 100 chars per line
Netiquette: Written text has no inflection, and, as such, you should be careful how you write your messages as interpretation will vary from person to person. Please take advantage of the built-in emoticons to add such expression to your words. Please remember the golden rule: to treat other forum users the way you would like to be treated. Please use common courtesy, and enjoy using Red Orchestra's forums
Offensive material
The following is a list of some things that MAY be considered "offensive" by the moderators and the team. This is NOT an exclusive list and it does depend very much on context.

Crossing the line into "offensive" territory is likely to get you asked to change your name, sig or avatar or to withdraw/delete posts. This will be done politely by the moderators. If you refuse to comply further action WILL be taken once started, ultimately leading to banning from the forums.

A key point: please attempt to use your brains. What is mild humour to you may well be deeply offensive to others. While we have no intention of acting as politically-correct "thought police", we are on the lookout for those things that can cause offense and, in some cases, are actually still illegal in some jurisdictions.
  1. Names recalling notorious war criminals or personalities.
  2. Names recalling atrocities and war crimes in general, or units with particularly odious histories.
  3. Use of obscenities and expletives.
  4. Blatant racism, mysogynism or many other "ism"s.
  5. Use of symbolism and regalia recalling Nazism or Fascism; this does not include pics of soldiers who happen to have such symbols on their uniform, unless we feel this has been done to provoke. Please note that many Nazi symbols (including the Swastika) are still illegal in Germany and other countries and considered deeply offensive by many Europeans.
  6. Use of symbolism and regalia recalling Stalinism.
  7. On both the previous two, the moderators' views on the intention and impact of use of such symbols will be final - not yours. Please be understanding if you are advised to change something.
  8. In general, if a sig/avatar represents your allegiances in-game and is clearly "in part", it is likely to be fine; if the moderators feel you are trying to demonstrate unpalatable political allegiances, or to use it in an attempt to ridicule or provoke others you WILL be asked to change it. RO is NOT the place to make any extremist political statements of any kind.
Examples:
So people get the idea, some examples that would be considered offensive, numbered as above:
  1. "Hitler", "Beria"
  2. "NKVD Blocking Detachment", "Einsatzgruppen"
  3. This one should be pretty obvious...
  4. So should this - and it includes calling all Germans "Nazis" and all Soviets/Russians "Commies". It got boring 50 years ago, so stop it.
  5. Use of swastikas, fasces, SS-runes and so on for the Axis.
  6. There is actually very little overt symbolism from the Stalinist era; the hammer-and-sickle isn't offensive per se.
A simple rule-of-thumb: many Europeans find Nazi symbolism of any sort offensive; many Americans still find Soviet symbolism offensive. Engage your brain before using.




Final Note: this is NOT open to debate, so please do NOT start whining and moaning if a moderator asks you to change something. They will advise at first, giving reasons, then, if you take no notice, they will step up the pressure through to banning.
See more
See less

Extending ROPawn issue

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extending ROPawn issue

    Morning,

    I have a custom pawn class that extends ROPawn as I want to override a couple of functions, but it's basically just a shell right now with some logging:
    Code:
    class FTPawn extends ROPawn;
    
    function bool Died(Controller Killer, class<DamageType> damageType, vector HitLocation)
    {
    	`Log(">>> DEBUG : Pawn Died", , 'FTPawn');
    
           super.Died(Killer, damageType, HitLocation);
    }
    
    DefaultProperties
    {
    }
    I also have the following set in my main game class default properties to ensure my pawn class gets used:
    Code:
    AIPawnClass=class'TOGAFT.FTPawn'
    DefaultPawnClass=class'TOGAFT.FTPawn'
    This is the same way I have my game mode setup in the UDK version I did a while back.

    However, my pawn class is not getting used like it does in the UDK. The gameclass is still somehow using ROPawn instead.

    All my other custom classes that extend/override are being used correctly, just not my pawn class

    Any thoughts?
    [URL="http://forums.tripwireinteractive.com/showthread.php?t=76417"]Custom Map - TE-DieBresche B5[/URL] | [URL="http://forums.tripwireinteractive.com/showthread.php?p=1042772#post1042772"]RO2 Cache Extractor and Map Downloader v1.2[/URL]

  • #2
    I don't expect that those "default pawn class" settings are ever used for anything. ROPawns are never spawned by the game, and if you're extending something off of those, I doubt they'd work right anyway, because it's two steps up in the hierarchy from the ones the game uses.

    The actual character objects spawned by the game are one of the ROGameContent.RO(Allied|Axis)PawnLevel(#)(Role) classes, retrieved from settings in the ROGameInfo. Do the console command "getall ROPawn class" on a live server to see an example.

    If you want to change which classes get spawned, the ROGameInfo is the place to start. You might be able to just find the current instance, edit its variables at runtime, and be done with it nice and cleanly.

    And yes, that means that overriding pawn behavior requires you to subclass every single one of the existing ones. All 300 of them. Just like I had to do 91 subclasses of the bullets and weapons for Antilag. Be prepared to get very familiar with the UnrealScript preprocessor

    It's a pain in the butt and it makes your final filesize proportionally larger, so it's worth the while to try to do it in any other way possible. Your Died override is better off done in the mutator PreventDeath hook, for instance.

    Comment


    • #3
      Originally posted by Mekhazzio View Post
      Your Died override is better off done in the mutator PreventDeath hook, for instance.
      Thank you, that appears to be good enough
      [URL="http://forums.tripwireinteractive.com/showthread.php?t=76417"]Custom Map - TE-DieBresche B5[/URL] | [URL="http://forums.tripwireinteractive.com/showthread.php?p=1042772#post1042772"]RO2 Cache Extractor and Map Downloader v1.2[/URL]

      Comment


      • #4
        It looks like I am going to have to subclass the lot as I need to alter more than a few vars - i need to change TakeDamage amongst other things....

        So if that is the case, do I need to put my version of TakeDamage into each subclass that I created?
        [URL="http://forums.tripwireinteractive.com/showthread.php?t=76417"]Custom Map - TE-DieBresche B5[/URL] | [URL="http://forums.tripwireinteractive.com/showthread.php?p=1042772#post1042772"]RO2 Cache Extractor and Map Downloader v1.2[/URL]

        Comment


        • #5
          Yep. I can post the Antilag source, if you want to see a (less in)convenient way of building the preprocessor skeleton for that, so you can let the make process handle the upkeep for you.

          But there's a mutator hook for TakeDamage too: Mutator.NetDamage. It's still live in ROPawn.

          Comment


          • #6
            Originally posted by Mekhazzio View Post
            Yep. I can post the Antilag source, if you want to see a (less in)convenient way of building the preprocessor skeleton for that, so you can let the make process handle the upkeep for you.
            I have absolutely no idea what you just said lol

            What the heck is a preprocessor skeleton?
            [URL="http://forums.tripwireinteractive.com/showthread.php?t=76417"]Custom Map - TE-DieBresche B5[/URL] | [URL="http://forums.tripwireinteractive.com/showthread.php?p=1042772#post1042772"]RO2 Cache Extractor and Map Downloader v1.2[/URL]

            Comment


            • #7
              A preprocessor is a system that skims and edits the code files before they're fed to the compiler. All those `ifdef lines you see sprinkled all over the stock code are preprocessor commands.

              Of note in this case is that you can use the preprocessor to shortcut the class-building for you. You can leave all your code in one easy-to-maintain file and simply have the preprocessor insert it automatically into a bunch of files that are so small & simple that you can just make them once (ideally with a script or batch file) and then never have to touch them again. In short, you make the skeleton, and let the computer do the work of fleshing it out.

              ...because keeping up that many classes by hand is insanity.

              Comment


              • #8
                Ah gotcha. So I could in theory just use `include in all my sub classes to point to my file that has the common code in?

                Code:
                class FTAxisPawnLevel6Assault extends ROAxisPawnLevel6Assault;
                
                `include(FTCommonPawn.uci)
                
                DefaultProperties
                {
                }
                Something like that ^
                [URL="http://forums.tripwireinteractive.com/showthread.php?t=76417"]Custom Map - TE-DieBresche B5[/URL] | [URL="http://forums.tripwireinteractive.com/showthread.php?p=1042772#post1042772"]RO2 Cache Extractor and Map Downloader v1.2[/URL]

                Comment


                • #9
                  That's the gist of it, yep. You could also use preprocessor macros to make sure that any variables or function calls get tailored to the file as well, or to make sure that some sections show up only in some files. It's a simple preprocessor, compared to some full-blown languages out there, but it's still capable of powerful things that can save you a lot of time and hassle.
                  Last edited by Mekhazzio; 04-22-2012, 12:35 PM.

                  Comment


                  • #10
                    That's a great help, thank you sir
                    [URL="http://forums.tripwireinteractive.com/showthread.php?t=76417"]Custom Map - TE-DieBresche B5[/URL] | [URL="http://forums.tripwireinteractive.com/showthread.php?p=1042772#post1042772"]RO2 Cache Extractor and Map Downloader v1.2[/URL]

                    Comment


                    • #11
                      Originally posted by Mekhazzio View Post
                      Yep. I can post the Antilag source, if you want to see a (less in)convenient way of building the preprocessor skeleton for that, so you can let the make process handle the upkeep for you.

                      But there's a mutator hook for TakeDamage too: Mutator.NetDamage. It's still live in ROPawn.
                      Would you mind posting your source? I'd be also interested to see how you did it.

                      Comment


                      • #12
                        Originally posted by Le0 View Post
                        Would you mind posting your source? I'd be also interested to see how you did it.
                        Posted here

                        Comment


                        • #13
                          Thanks a lot, this will be interesting

                          Comment


                          • #14
                            Right, thought id post back in this thread as it's relevant to my current issue...

                            As mentioned above, I have created a bunch of classes that extend each of the games player class (AxisPawnLevel1Eng, AxisPawnLevel2Eng etc), each of which has an include so they all run some common code which works fine.

                            Now when in-game, when I aim down my sights and press my use key, If I am looking at a team mate that is in a certain state, I need to set a variable on that players custom pawn class (which ever one it may be).

                            I have done the trace code and it writes some debug info to screen:
                            Code:
                            ClientMessage("Hit: "$HitActor$"  class: "$HitActor.class.outer.name$"."$HitActor.class);
                            Would write out something like:
                            Code:
                            Hit: FTAxisPawnLevel1Engineer etc
                            How can I set a variable if the class could be one of several possible classes?

                            If this were c# I would have created an interface which each of my custom class inherits so I could call it with confidence...

                            I could of course have a rather large case statement doing IsA('FTblah...') and then just cast it, but i'm hoping there is a more quick way.

                            Any thoughts appreciated
                            [URL="http://forums.tripwireinteractive.com/showthread.php?t=76417"]Custom Map - TE-DieBresche B5[/URL] | [URL="http://forums.tripwireinteractive.com/showthread.php?p=1042772#post1042772"]RO2 Cache Extractor and Map Downloader v1.2[/URL]

                            Comment


                            • #15
                              Try the Implements or Inherits class specifiers.

                              For more info:
                              Class Specifiers (scroll down)
                              Interfaces
                              TWB*BlueDuck

                              Comment

                              Working...
                              X