Multiple map prefix for custom game type?

Discussions about Coding and Scripting
Post Reply
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Multiple map prefix for custom game type?

Post by 1337GameDev »

I’m curious if there is a way to specify multiple map prefixes for a custom game type.

I am making a game type that I want to work on ctf, dm, and dom maps (it’ll pre process and swap actors), and am curious if this is possible.
User avatar
EvilGrins
Godlike
Posts: 9690
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Multiple map prefix for custom game type?

Post by EvilGrins »

MonsterMadness, when the last version for ut99 was made, had a gametype built in called "Us Against Them" which uses EVERY map you have to be played on.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Multiple map prefix for custom game type?

Post by 1337GameDev »

Hmm, do you have a code example?

I know there’s a trick by specifying “D” do get DM and DOM, but there’s no way to use a Regex or multiple prefixes..... any way to do this?
User avatar
EvilGrins
Godlike
Posts: 9690
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: Multiple map prefix for custom game type?

Post by EvilGrins »

Well, here it is... maybe you can figure it out.
Attachments
MonsterMadness.zip
(153.95 KiB) Downloaded 19 times
Shot0000.png
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
User avatar
OjitroC
Godlike
Posts: 3613
Joined: Sat Sep 12, 2015 8:46 pm

Re: Multiple map prefix for custom game type?

Post by OjitroC »

Monster Madness is, in essence, a mutator to spawn monsters in maps in the same way that Monster Spawn does - MM obviously assigns monsters and players to teams in order to deal with the scoring.

The Us v Them gametype is subclassed from Botpack.TeamGamePlus (from which the UT team games like CTF or AS are subclassed) and so it is not map gametype dependent - it's a team game that can be played on any map. Thus the Us v Them gametype doesn't need to deal with map or gametype prefixes.
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Multiple map prefix for custom game type?

Post by 1337GameDev »

Hmmm, well I would prefer not to have to subclass an existing gametype (and then have multiple copies of my gametype) for each map support... :/ I feel there has to be SOME kind of way... if not, that'll really be disappointing...
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Multiple map prefix for custom game type?

Post by Barbie »

I really didn't get what you want to aim. You can run any map as any game type - of course it will not work out of the box for any combination, because nessessary actors are missing (e.g. Flags are needed for CTF maps). But I think they can be added on the fly while the map is loaded.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Multiple map prefix for custom game type?

Post by 1337GameDev »

Barbie wrote: Wed Jul 21, 2021 9:56 pm I really didn't get what you want to aim. You can run any map as any game type - of course it will not work out of the box for any combination, because nessessary actors are missing (e.g. Flags are needed for CTF maps). But I think they can be added on the fly while the map is loaded.
I have a custom gametype, that I want to have access to a wide variety of maps, and will handle ctf, dom, etc maps, but will essentially be DM-like.

I want to be able to select dom/ctf/etc maps for this gametype if I start a match, selecting my gametype. I currently cannot do that in the game menus, due to gametype map prefixes. I want to override this.
You can run any map as any game type

Besides command line / forced map loading via a script when loading a map, how is this done?
User avatar
UnrealGGecko
Godlike
Posts: 2903
Joined: Wed Feb 01, 2012 11:26 am
Personal rank: GEx the Gecko
Location: Kaunas, Lithuania
Contact:

Re: Multiple map prefix for custom game type?

Post by UnrealGGecko »

Sadly I think in most gametypes Ive tried its set to either 1 prefix or no prefix at all. If the gametype does support other prefixes it is labeled as a seperate gametype in the menu. I wouldnt recommend setting it to no prefix though, because then it would load EVERYTHING you have in the map folder.
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Multiple map prefix for custom game type?

Post by 1337GameDev »

Barbie wrote: Wed Jul 21, 2021 9:56 pm I really didn't get what you want to aim. You can run any map as any game type - of course it will not work out of the box for any combination, because nessessary actors are missing (e.g. Flags are needed for CTF maps). But I think they can be added on the fly while the map is loaded.
So is this post wrong (or only is possible if you rename the map, or specify via command line)?

(The part about loading and map with any gametype)
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Multiple map prefix for custom game type?

Post by Barbie »

To change the default game type, add the game type to the command line, for example

Code: Select all

UnrealTournament.exe ..\Maps\CTF-Face.unr?Game=Botpack.DeathMatchPlus
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Multiple map prefix for custom game type?

Post by 1337GameDev »

Barbie wrote: Fri Jul 23, 2021 7:17 pm To change the default game type, add the game type to the command line, for example

Code: Select all

UnrealTournament.exe ..\Maps\CTF-Face.unr?Game=Botpack.DeathMatchPlus
So there's no way in-game?
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Multiple map prefix for custom game type?

Post by Barbie »

1337GameDev wrote: Sat Jul 24, 2021 6:18 pmSo there's no way in-game?
Interesting idea: start any map as DM, then add some flags or ControlPoints, divide players in groups and make a CTF or DOM of it. Ofc you have to change some things depending of game type like the algorithm to find a player start or scoring. And/Or change LevelInfo.GameInfo.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
1337GameDev
Skilled
Posts: 198
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Multiple map prefix for custom game type?

Post by 1337GameDev »

Barbie wrote: Sat Jul 24, 2021 8:27 pm
1337GameDev wrote: Sat Jul 24, 2021 6:18 pmSo there's no way in-game?
Interesting idea: start any map as DM, then add some flags or ControlPoints, divide players in groups and make a CTF or DOM of it. Ofc you have to change some things depending of game type like the algorithm to find a player start or scoring. And/Or change LevelInfo.GameInfo.
"In game" means via the menus to start a server, practice session, etc ....

My gametype world "patch" maps to accommodate the gametype I want.... (Essentially deathmatch).

I just want to be able to select (and users who install my mod) any map I have added a "patcher" for, in order to increase content that users can use with my gametype.
Post Reply