UnrealRace_v1b2

Discussions about GameTypes
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

UnrealRace_v1b2

Post by PrinceOfFunky »

UnrealRace is a gametype that lets players and potentially other actors to race in a track.
Readme.txt
Name: UnrealRace
Version: 1b2
Author: Francesco Biscazzo
Date: 2016-2019
Description: A race gametype that lets players and potentially other actors to race in a track.

INDEX:
- Notes for players;
- Important notes;
- Instructions for mappers;
- Configurable settings for the main ini file;
- Configurable settings for "UnrealRace/inventory_list.int";
- Information for developers;

Notes for players:
- The more times you passed the finish line on reverse, the more times you will have to pass it normally in order to be able to finish laps again;
|
"Mutate" commands:
- stuck: Teleports you to the penultimate checkpoint;
- rlystuck: Deletes all the checkpoints and teleports you to a playerstart;

Important notes:
- Every racer has a current lap and a highest lap, the first one is the lap the racer is currently in, the second one is the highest lap the racer have been in in the entire race. The HUD displays the highest lap;

Instructions for mappers:
[Race]
- Each map region(specified by portal zones) can be turned into a race section, to do it just place a ScrollingMessageTexture in that region, set its Tag to RACE_SECTION and write the section type name as value of ScrollingMessage variable. ScrollingMessage can also have options declared as queries with this format - SECTION_TYPE_NAME?option1=value1?option2=value2?option_n=value_n - some are section-type-specific while others can be declared in any section. Also some options are interpreted as access-limitors, they tell if a racer can access a section or not.
NOTE: If there are no TRACK sections the "track" will be on blacklist mode (See "TRACK" explanation below).
|
The standard race section names are:
- START: If a racer goes from this section to a FINISH section the racer will finish a lap;
- FINISH: (See START);
- TRACK: You can think of the track like being in one of these two modes:
-- Blacklist mode: This mode treats any region without a race section as TRACK section, which means that for any section you want to be interpreted as OFFTRACK you'll need to do it manually;
-- Whitelist mode: Same of blacklist mode but swap TRACK with OFFTRACK;
-- The TRACK options are:
--- number: The number of the track, if a racer goes from a track to another with a lower number it'll be interpreted as going wrong way;
- OFFTRACK: If a racer enters this section it'll be considered offtrack.
-- The OFFTRACK options are:
--- limit: The amount of delay before the racer is actually considered offtrack;
- NOP: No operation section, useful when the track is in whitelist mode and you don't want a TRACK in a section but you still want racers to be able to pass by;
|
The standard limitors are:
- laplt=<lap_count>: Let's only the racers that are on a lap lower than lap_count access the section;
- laple=<lap_count>: Let's only the racers that are on the same lap of lap_count or lower access the section;
- lapne=<lap_count>: Let's only the racers that are not on the same lap of lap_count access the section;
- lape=<lap_count>: Let's only the racers that are on the same lap of lap_count access the section;
- lapge=<lap_count>: Let's only the racers that are on the same lap of lap_count or greater access the section;
- lapgt=<lap_count>: Let's only the racers that are on a lap greater than lap_count access the section;
|
NOTE: Contraddictions in conditions are not taken in account. E.g. ?lapne=2?laplt=3 will let the access for each lap under the third one including the second one.
|
The standard global options that can be added to any section are:
- wdaccess: If the racer is going to the wrong direction (went from FINISH to START), let's it access sections that wouldn't otherwise be accessible;
- addinv=<package.inventory_class>: Adds an inventory item of inventory_class to the racer's inventory;
- delinv=<package.inventory_class>: Deletes all the inventory items of inventory_class from the racer's inventory;
- defaultinv: Adds the default inventory to the racer;
- saveinv: Saves the current racer's inventory for a future use;
- loadinv: Loads a previousy saved racer's inventory and adds it back to the racer;
- cp: Spawns a checkpoint for the racer;
- nocp: Prevents the racer to be able to spawn checkpoints for the section;
- delcp: Deletes the racer's checkpoint;
- trigger=<tag>: Makes the racer trigger every actor with the specified tag;
- untrigger=<tag>: Makes the racer untrigger every actor with the specified tag;
|
NOTE: When the race begins every actor with "RACE_BEGIN" as tag will be triggered. Same happens when the race ends with "RACE_END".
NOTE: If an actor with "RACE_OFFTRACK" as tag gets triggered and the instigator is a racer, it will be considered offtrack.
|
ItemBox:
- When an item box is picked up by a racer it will give the racer a random inventory item, based on the "UnrealRace/inventory_list.int" file (See below for "Configurable settings" for "UnrealRace/inventory_list.int");
- To place one just place a ScrollingMessageTexture and set its Tag to RACE_ITEM_BOX. An ItemBox can also have query options, these options are:
-- copydesign: If true the ItemBox will be spawned copying these settings from the ScrollingMessageTexture: CollisionRadius, CollisionHeight, DrawScale;
|
Map racers:
- Any actor can be potentially turned into a racer, to do it just place a ScrollingMessageTexture and set its Tag to RACER_LINK;
- These query options are necessary:
-- racer=<level.actor>: Specifies the level actor that will be considered as a racer;
- These query options are extra:
-- team=<number>: Specifies the number of the team the racer will be in;
-- currlap=<number>: Specifies the lap the racer will start in;
-- highestlap=<number>: Specifies the highest lap the racer "has been in";

Configurable settins (main ini file):
- globalconfig (subclasses will share the same value):
-- RaceHUD.bHideLaps: If true the laps counter is hidden from the HUD;
-- RaceHUD.bHideRearMirror: If true the rear mirror is hidden from the HUD;
-- Race.minCPSpawnHeight: The minimum height from an allowed place to land on that a checkpoint can be spawned in;
-- Race.allowedCPSpawnDistance: The distance from a pick-up-able item out of which a CP can spawn;
-- Race.maxBlinks: The maximum times the racer can blink;
-- Race.blinkInterval: The interval between each blink;
-- Race.wrongDirLoopInterval: The interval between each "Wrong Direction" message;
-- Race.maxItemBoxIters: The maximum times an ItemBox can look for a random item to give to the racer;
|
- config (subclasses will have their own value):
-- Race.bLogs: Use it to debug;
-- Race.bScreenLogs: If true, if bLogs is true, logs will be shown on screen other than on the console;
-- Race.bInGameLogin: If true players and bots can spawn/login in the middle of the match and race with the others, newly spawned racers will be put in the lap the racer within the lowest lap is. If false bots won't be able to spawn in the middle of the match and players will become spectators;
-- Race.maxLaps: If set to '0' there will be unlimited laps;
-- Race.CPInterval: The time interval between the spawning of RacerCheckPoints. If set to '0' RacerCheckPoints won't be used, which means the racers will always respawn from a PlayerStart;

Configurable settings (UnrealRace/inventory_list.int):
- CLASSES.COUNT=<count>: The amount of inventory classes that are specified in the file;
- CLASSES.CLASS_<n>=<package.inventory_class>: An inventory class where "n" is the numeric index of the class in the list;
- PROBABILITIES.<package.inventory_class>=<amount>: The amount of probabilities between 0 and 1 that this class will be most likely choosen to be given to the racer;
- AMMO.<package.inventory_class>=<amount>: The amount of ammo that the inventory class will be spawned with;

Information for developers:
- UnrealRace provides a base mutator class called URMutator with these functions:
-- limitSection: Called when a section limitor hasn't been recognized;
-- processSectionName: Called when a section name hasn't been recognized;
-- processSectionOption: Called when a section option hasn't been recognized;
-- skipTrack: Called when a racer is trying to go from a track to another with a higher number than "last_accessed_highest_track_number + 1";
-- preventFinish: Called when the race is supposed to end because a racer reached the maxLaps;
|
Classes descriptions:
- TimerInfo: Basically a timer that stops after the specified maxIter(ation)s;
- WrongDirectionLoopInfo: Keeps displaying an onscreen wrong direction message to the racer within a certain interval;
- BlinkTimerInfo: Makes an actor blink;
- ItemBox: A box that when picked up gives one random inventory picked from the inventory_list file to the actor;
- OffTrackCatcher: Tells the game if a racer went offtrack by catching the event "RACE_OFFTRACK";
- OffTrackTimerInfo: Send the racer offtrack if it has been inside an OFFTRACK section over a certain limit;
- RaceMessenger: Displays onscreen messages to the racer owner;
- URMutator: The base mutator class for UnrealRace;
- RaceMutator: When a racer is about to die prevents it and send the racer offtrack. Also adds some commands to the game;
- RacerCheckPoint: A checkpoint spawned as a mark to move the racer owner to the Location of this checkpoint;
- RaceUtils: Mostly static utilities;
- Race: Let's actors race on a track;
- RaceReplicationInfo: Handles race replication;
- RacerInfo: Basically, this is the class who lets an actor to race;
- RaceHUD;
- RaceScoreBoard;

Changelogs:
[1b2]
- Major changes;
- Replication fixed;
- Added section-limitors;
- Added a custom HUD;
[1b1]
- Minor bug fixes;
- Added class TimerInfo: A class can only have one timer, so spawning this class lets you have multiple timers;
- Added class BlinkTimerInfo: Manages the blinking of a racer;
- Added class OffTrackTimerInfo: Manages the off-track countdown of a racer;
- Added class ItemBox: A box pickup that when touched by a racer gives it an inventory item;
- Changed name of class "RacerThread" to "RacerInfo";
- Race sections(like TRACK and FINISH) are now calculated by ScrollingMessageTexture's in regions(specified by portal zones) instead than by ZoneInfo's.
You do not have the required permissions to view the files attached to this post.
Last edited by PrinceOfFunky on Wed Jul 31, 2019 10:17 pm, edited 10 times in total.
User avatar
Dr.Flay
Godlike
Posts: 3351
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK

Re: UnrealRace version=0.7[ALPHA]

Post by Dr.Flay »

:wth:
Alphas by their nature are not fit for wide public use, and should have a big warning at the beginning that, it will crash or do unexpected things.

Be warned anyone that downloads it, and please do not complain, but submit bug reports with log files.
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: UnrealRace version=0.7[ALPHA]

Post by PrinceOfFunky »

Dr.Flay wrote::wth:
Alphas by their nature are not fit for wide public use, and should have a big warning at the beginning that, it will crash or do unexpected things.

Be warned anyone that downloads it, and please do not complain, but submit bug reports with log files.
The main title already says [ALPHA], isn't it to be interpreted as a "probably lot bugged" software? :/
I'll change the title at any version. This one is just to show people that the main concept of the race works well.
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: UnrealRace_v01b

Post by PrinceOfFunky »

Just to know but, did someone try it?
Because it actually doesn't rly need a "Net anti-cheat system" lol, that was before to understanding how Replication worked XD
User avatar
papercoffee
Godlike
Posts: 10531
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: UnrealRace_v1b1

Post by papercoffee »

Any pictures how this whole thing look like?
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: UnrealRace_v1b1

Post by PrinceOfFunky »

papercoffee wrote:Any pictures how this whole thing look like?
Mhm? It's in GameType section, it's like asking a picture t represent Last Man Standing gametype.

I guess this gives an idea of this gametype:
fox.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
papercoffee
Godlike
Posts: 10531
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: UnrealRace_v1b1

Post by papercoffee »

Oh ...ok ...I thought you had also made some custom models as well.
And you mentioned your test map.

never mind.
User avatar
PrinceOfFunky
Godlike
Posts: 1204
Joined: Mon Aug 31, 2015 10:31 pm

Re: UnrealRace_v1b1

Post by PrinceOfFunky »

papercoffee wrote:Oh ...ok ...I thought you had also made some custom models as well.
And you mentioned your test map.

never mind.
You mean the example maps? They are there to show it works fine :D Also mappers can learn how to make a race map looking at those examples.
There are no custom models, everymap, if it contains the right portals and actors can be played with this gametype, for example, if CTF-Face had the right portals and actors to let it be possible to play it with this gametype then it could work with this gametype as well.