Any mappers / scripters alive and/or active?

Feedback, discussion & bug reporting on current maps
DaveTheBlaze
Posts: 22
Joined: Sun 15. Mar 2020, 18:28
Description: CovidFreeMapper

Any mappers / scripters alive and/or active?

Post by DaveTheBlaze » Mon 16. Mar 2020, 17:45

Hi guys,
So I've started a forlorn attempt beeing a mapper myself. Although it turns out quite nicely I still struggle with some implementations.
I would like to know if there are any mappers or scripters in here who are able or willing to help me with some issues.

For now I stick to racing maps, so the basis would be the Assault gametype although I'm implementing minor features of other gametypes as well via mutators (ONS, Invasion, etc.).

Currently I struggle with two things:
1) Setting up multiple radar image files beeing triggered at a certain place on the map (because one image file alone wouldn't cover the whole map).
-> Using the mutator "TeamRadar" https://www.utzone.de/forum/downloads.p ... le&id=1109
-> Note: the mutator is working fine, the radar shows up quite nicely. Although there is no background image for the icons overlay yet (which I need help with).

2) Editing actor scripts in order for them to do what I'd like them to do:
-> for example: creating a new pawn with custom attributes and functions
-> or adding 'Announcer_DisabledObjective' sounds for a custom made proximity objective

Well, I don't set my hopes too high, but if there is anyone in here knowing some stuff, feel free to share.
I highly appreciate any kind of help.

Thanks in advance!
Greets, Dave

User avatar
GLoups!
Posts: 552
Joined: Fri 3. Feb 2012, 17:57
Description: Just play for fun.
Location: Fr

Any mappers / scripters alive and/or active?

Post by GLoups! » Wed 18. Mar 2020, 14:57

Hello, Dave may be the UltimateRadarMap from Crusha/UltimateMappingTools should be a good alternative as it avoid to add a mutator to a map as it 's a simple actor, although i had never test it, then you could try to use a material switch as Radar-image with a limitation of having a fixed sequence for materials or would suffice if you have only 2 image for triggering. (the UTMaterialTrigger/JBMaterialTrigger is required to work online).

Lastly dunno if it's even possible to make an actor that could modify the RadarMapImage in class LevelInfo, you can eventually try to create a new MaterialSwitch class.

DaveTheBlaze
Posts: 22
Joined: Sun 15. Mar 2020, 18:28
Description: CovidFreeMapper

Any mappers / scripters alive and/or active?

Post by DaveTheBlaze » Wed 18. Mar 2020, 17:27

hi there, and thanks for replying!
GLoups! wrote:
Wed 18. Mar 2020, 14:57
may be the UltimateRadarMap from be a good alternative as it avoid to add a mutator to a map as it 's a simple actor
ye, I started with this actor (more like 3 actors including VehicleTracking etc.) but unfortunately it relies on another actor 'UltimateONSVehicleFactory' in order to track the cars on the radar image.
And as it happens to be, the mentioned UltimateVehicleFactory isn't working on racing servers because the standard Bender/Scorp vehicles are replaced by a custom model for racing which is defined inside an .ini file (it searches for a tag and if found, it replaces the car with another ID).
̶m̶e̶̶a̶̶n̶̶i̶̶n̶̶g̶̶:̶̶ ̶̶i̶̶ ̶̶c̶̶a̶̶n̶̶ ̶̶p̶̶u̶̶t̶̶ ̶̶t̶̶h̶̶e̶̶ ̶̶u̶̶l̶̶t̶̶i̶̶m̶̶a̶̶t̶̶e̶̶v̶̶e̶̶h̶̶i̶̶c̶̶l̶̶e̶̶f̶̶a̶̶c̶̶t̶̶o̶̶r̶̶y̶̶ ̶̶o̶̶n̶̶ ̶̶t̶̶h̶̶e̶̶ ̶̶m̶̶a̶̶p̶̶ ̶̶b̶̶u̶̶t̶̶ ̶̶t̶̶h̶̶e̶̶r̶̶e̶̶ ̶̶w̶̶o̶̶n̶'̶t̶̶ ̶̶b̶̶e̶̶ ̶̶a̶̶n̶̶y̶̶ ̶̶c̶̶a̶̶r̶̶s̶̶ ̶̶s̶̶p̶̶a̶̶w̶̶n̶̶i̶̶n̶̶g̶̶ ̶̶i̶̶n̶̶g̶̶a̶̶m̶̶e̶̶ ̶̶:̶(̶.̶
->̶ ̶̶p̶̶r̶̶o̶̶b̶̶a̶̶b̶̶l̶̶y̶̶ ̶̶b̶̶e̶̶c̶̶a̶̶u̶̶s̶̶e̶̶ ̶̶t̶̶h̶̶e̶̶ ̶̶l̶̶d̶̶g̶̶ ̶̶r̶̶a̶̶c̶̶i̶̶n̶̶g̶̶ ̶̶v̶̶e̶̶h̶̶i̶̶c̶̶l̶̶e̶̶ ̶̶r̶̶e̶̶p̶̶l̶̶a̶̶c̶̶e̶̶m̶̶e̶̶n̶̶t̶̶ ̶̶o̶̶n̶̶l̶̶y̶̶ ̶̶w̶̶o̶̶r̶̶k̶̶s̶̶ ̶̶f̶̶o̶̶r̶̶ ̶̶t̶̶h̶̶e̶̶ ̶̶s̶̶t̶̶a̶̶n̶̶d̶̶a̶̶r̶̶d̶̶ ̶̶a̶̶s̶̶v̶̶e̶̶h̶̶i̶̶c̶̶l̶̶e̶̶f̶̶a̶̶c̶̶t̶̶o̶̶r̶̶y̶̶.̶̶ ̶̶e̶̶v̶̶e̶̶r̶̶y̶̶t̶̶h̶̶i̶̶n̶̶g̶̶ ̶̶e̶̶l̶̶s̶̶e̶̶ ̶̶i̶̶s̶̶ ̶̶i̶̶g̶̶n̶̶o̶̶r̶̶e̶̶d̶̶.̶
̶b̶̶u̶̶t̶̶ ̶̶i̶'̶m̶̶ ̶̶n̶̶o̶̶t̶̶ ̶̶s̶̶u̶̶r̶̶e̶̶ ̶̶i̶̶f̶̶ ̶̶i̶'̶m̶̶ ̶̶c̶̶o̶̶n̶̶f̶̶u̶̶s̶̶i̶̶n̶̶g̶̶ ̶̶s̶̶o̶̶m̶̶e̶̶t̶̶h̶̶i̶̶n̶̶g̶̶ ̶̶h̶̶e̶̶r̶̶e̶̶ ̶̶o̶̶r̶̶ ̶̶i̶̶f̶̶ ̶̶i̶'̶m̶̶ ̶̶d̶̶o̶̶i̶̶n̶̶g̶̶ ̶̶s̶̶o̶̶m̶̶e̶̶t̶̶h̶̶i̶̶n̶̶g̶̶ ̶̶w̶̶r̶̶o̶̶n̶̶g̶̶.̶̶ ̶̶m̶̶a̶̶y̶̶b̶̶e̶̶ ̶̶i̶̶t̶̶ ̶̶c̶̶o̶̶u̶̶l̶̶d̶̶ ̶̶w̶̶o̶̶r̶̶k̶̶ ̶̶a̶̶n̶̶d̶̶ ̶̶i̶'̶m̶̶ ̶̶j̶̶u̶̶s̶̶t̶̶ ̶̶t̶̶o̶̶o̶̶ ̶̶s̶̶t̶̶u̶̶p̶̶i̶̶d̶̶ ̶̶t̶̶o̶̶ ̶̶i̶̶m̶̶p̶̶l̶̶e̶̶m̶̶e̶̶n̶̶t̶̶ ̶̶i̶̶t̶̶ ̶̶c̶̶o̶̶r̶̶r̶̶e̶̶c̶̶t̶̶l̶̶y̶̶ ̶̶i̶̶n̶̶ ̶̶a̶̶n̶̶ ̶̶a̶̶s̶̶ ̶̶g̶̶a̶̶m̶̶e̶̶t̶̶y̶̶p̶̶e̶̶?̶̶ ̶̶ ̶̶:̶̶?̶̶ ̶
UPDATE: blimey, I should have used the actor "UltimateONSPRVFactory" instead of the parent actor "UltimateONSFactory". Now a car is spawning, but as expected it is not replaced and therefore can't use the LDGRacing abilities like nitro, repairing, shielding. So it won't help me much.
GLoups! wrote:
Wed 18. Mar 2020, 14:57
then you could try to use a material switch as Radar-image with a limitation of having a fixed sequence for materials or would suffice if you have only 2 image for triggering. (the UTMaterialTrigger/JBMaterialTrigger is required to work online).
Isn't a material trigger for spawning material on the map? Sorry, never used a material trigger before. How does it work?
Couldn't I just place 2 radar actors and link them to two different radar image files? The first actor is active at the beginning of the map, the other one gets triggered on a certain spot on the map to activate the second actor for the player that is passing that spot.
GLoups! wrote:
Wed 18. Mar 2020, 14:57
Lastly dunno if it's even possible to make an actor that could modify the RadarMapImage in class LevelInfo, you can eventually try to create a new MaterialSwitch class.
Well, I didn't really want to create a new actor for this, rather edit an existing radar mutator.
Maybe the TeamRadar mutator is capable of saving more than one image file (not sure) but in order to test that I need to figure out how to set even one image file for the mutator in the first place. Still haven't figured out where to define the image file inside the mutator.

Would it help if I uploaded the map so you could see what I mean? For now everything is saved inside myLevel, for easy transfer. So one 140 MB big .ut2 map. (UltimateMappingTools & TeamRadar required for opening the map , LDGRacingMod required for playing the map inside UT2k4)


One offtopic question at last:
If I have the following structure inside the actor browser:
Actor -> Class1 -> Class2 -> Class3 ("->" indicates a sub-category of that Class)
who is parent for Class3? Only Class2 or Class1 as well?
It seems if I edit Class3 in the script editor, is doesn't use the variables set inside Class1.

User avatar
GLoups!
Posts: 552
Joined: Fri 3. Feb 2012, 17:57
Description: Just play for fun.
Location: Fr

Any mappers / scripters alive and/or active?

Post by GLoups! » Wed 18. Mar 2020, 20:18

Weird, the UltimateRadarMap actor mentioned UltimateVCTFFactory in it's code which is somehow logic because Ons has already it's radar assign, i'm not a pro scripter but what if you
myleveled (obj load file=UltimateMappingTools.u package=myLevel) and make a subclass of the UltimateRadarMap class to override the simulated event PostBeginPlay() and change it to AsVehicleFactory, or
you can ask directly to Crusha by PM i know he was here not so long ago:

Code: Select all

simulated event PostBeginPlay()
{
    local UltimateVCTFFactory UVF;
    local int i;

    if (bDisabled)
    {
        return;
    }

//  UltimateRadarMapPanel.ClassName = string(class'UT2K4Tab_UltimateRadarMap');

    foreach AllActors(class'UltimateVCTFFactory', UVF)
    {
        if (bHasRadarVehicles)
            break;

        for (i = 0; i < UVF.VehicleList.Length; i++)
        {
            if (UVF.VehicleList[i].bTrackVehicleOnRadar)
            {
                bHasRadarVehicles = True;
                break;
            }
        }
    }

    if (Level.NetMode != NM_DedicatedServer) // don't spawn the overlay and menu panel on dedicated servers
    {
        Enable ('Tick');
    }
    else
    {
        Disable ('Tick');
    }
}
DaveTheBlaze wrote:
Wed 18. Mar 2020, 17:27
Maybe the TeamRadar mutator is capable of saving more than one image file (not sure) but in order to test that I need to figure out how to set even one image file for the mutator in the first place. Still haven't figured out where to define the image file inside the mutator.
Anyway it seems that in both case, mutator "TeamRadar" and UltimateRadarMap, you have to specify the image file in the Level Properties (unrealed) under RadarMap/RadarMapImage.

Material Switch quick tutorial.

I. Material Browser
- Make a Material Switch (File > New > Raw > Material Switch). call it as you want "MaterialSwitch01".
- Go into the properties of the material switch. Add 2 (or more but it's sequential) slots to the material list. In the first one put the first radar texture. In the second one put the second radar texture you want to be turned on.
- Make sure "Current" is set to 0.

-Add the UTMaterialTrigger from UltmateMappingTool required to work online.
-Put the name of the Material switch you've created (in use for complete name) and fill the event/tag as you want.
-Put the name of the Material switch in the Level Properties under RadarMap/RadarMapImage.
-You can now trigger the Material switch tag via a ScriptedTrigger, simple Trigger, VolumeTrigger, mover or what ever you want.
UTMaterialTrigger.jpg
DaveTheBlaze wrote:
Wed 18. Mar 2020, 17:27
One offtopic question at last:
If I have the following structure inside the actor browser:
Actor -> Class1 -> Class2 -> Class3 ("->" indicates a sub-category of that Class)
who is parent for Class3? Only Class2 or Class1 as well?
It seems if I edit Class3 in the script editor, is doesn't use the variables set inside Class1.
I think in somes cases you use unrealed buggy compilation, the variables are erased at each compilation (not always), it's better to use UCC, or you will have to painfully re-enter the variables at each compilation :dammit: .

You can check the hiden variables with the command "editdefault class=SVehicleFactory" or any class you want.
You do not have the required permissions to view the files attached to this post.

DaveTheBlaze
Posts: 22
Joined: Sun 15. Mar 2020, 18:28
Description: CovidFreeMapper

Any mappers / scripters alive and/or active?

Post by DaveTheBlaze » Wed 18. Mar 2020, 20:59

Thanks, I will try ithat soonish.
But before that I have to get the ONSBender to work :/.
Let's do this piece by piece.

1)
For now I've created a new subclass of the actor 'UltimateONSPRVFactory' and put the function for the LDGTag into it.
This is the complete code:
//=============================================================================
// MyUltimateONSPRVFactory.
//=============================================================================
class MyUltimateONSPRVFactory extends UltimateONSPRVFactory
placeable;


var(VehicleTypeTag) string VehicleTypeTag;

function PreBeginPlay()
{
local int i;

Super.PreBeginPlay();

if (VehicleTypeTag == "")
return;

for (i = 0; i < class'VehicleTags'.default.VTags.Length; i++)
{
if (class'VehicleTags'.default.VTags.TypeTag ~= VehicleTypeTag)
{
VehicleClass = class<Vehicle>(DynamicLoadObject(class'VehicleTags'.default.VTags.TypeClass, class'Class'));
return;
}
}

Log(Name$": Could not find replacement for type tag: "$VehicleTypeTag);
}


I entered the correct VehicleTypeTag = TWB to its default properties but unfortunately without success. The car still isn't replaced, and yet has no abilites. I don't really get why. Normally the code above extends an ASTaggedVehicleFactory (where a car is in fact replaced fine). But it theoretically should work for any other VehicleFactory as well, shouldn't it?

2)
Why did you suggest to use the actor 'UltimateVCTFFactory' instead? Is there any advantage using this actor instead of the 'UltimateONSFactory' or 'UltimateONSPRVFactory'?

3)
thanks for the UCC hint, trying to use it instead now :)
and thanks for the MaterialTrigger guide, I understand how it works now :)

EDIT#1:
Compiling with UCC gives me the following error message, maybe thats the cause of the problem, idk:
UCC_ERROR.jpg
EDIT#2:
What name do I choose for "Name of Package" inside UCC? Where are the custom scripts stored? 'myLevel.u' didn't work well.
UCC_Menu.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
GLoups!
Posts: 552
Joined: Fri 3. Feb 2012, 17:57
Description: Just play for fun.
Location: Fr

Any mappers / scripters alive and/or active?

Post by GLoups! » Wed 18. Mar 2020, 21:43

No i suggested to use AsVehicleFactory because i suspect the LDGRacingMod to check only for AsVehicleFactory and not SvehicleFactory which is the parent class of ONSvehicleFactory as it's an Assault server, and i remember having somes troubles with controllers trying to put AsFactory in Ons map, looking at the tree class OnsFactory and AsFactory are not without reasons derived from the same parent class SvehicleFactory .
Btw changing the tag on a OnsFactory will have no effect if the mod is only checking for AsFactory.

Edit: you can't make a subclass out of unrealed without rebuild the whole needed UltimateMappingTool class which is not what you want to do.

DaveTheBlaze
Posts: 22
Joined: Sun 15. Mar 2020, 18:28
Description: CovidFreeMapper

Any mappers / scripters alive and/or active?

Post by DaveTheBlaze » Wed 18. Mar 2020, 21:53

GLoups! wrote:
Wed 18. Mar 2020, 21:43
No i suggested to use AsVehicleFactory because i suspect the LDGRacingMod to check only for AsVehicleFactory and not SvehicleFactory which is the parent class of ONSvehicleFactory as it's an Assault server.
Makes sense, but your code refers to a "UltimateVCTFFactory UVF". I have never placed such an actor on any of my maps.
Oh wait, you told me to change that to ASTaggedVehicleFactory, must have been skipping this part by coincidence ^^'.
GLoups! wrote:
Wed 18. Mar 2020, 21:43
Btw changing the tag on a OnsFactory will have no effect if the mod is only checking for AsFactory.
hm, makes sense as well. Seems like the only explanation.
Guess I give up making them compatible.

User avatar
GLoups!
Posts: 552
Joined: Fri 3. Feb 2012, 17:57
Description: Just play for fun.
Location: Fr

Any mappers / scripters alive and/or active?

Post by GLoups! » Wed 18. Mar 2020, 22:01

DaveTheBlaze wrote:
Wed 18. Mar 2020, 21:53
GLoups! wrote:
Wed 18. Mar 2020, 21:43
No i suggested to use AsVehicleFactory because i suspect the LDGRacingMod to check only for AsVehicleFactory and not SvehicleFactory which is the parent class of ONSvehicleFactory as it's an Assault server.
Makes sense, but your code refers to a "UltimateVCTFFactory UVF". I have never placed such an actor on any of my maps.
Oh wait, you told me to change that to ASTaggedVehicleFactory, must have been skipping this part by coincidence ^^'.
GLoups! wrote:
Wed 18. Mar 2020, 21:43
Btw changing the tag on a OnsFactory will have no effect if the mod is only checking for AsFactory.
hm, makes sense as well. Seems like the only explanation.
Guess I give up making them compatible.
I suggested to make a subclass of UltimateRadarMap in unrealed and override the simulated event PostBeginPlay() who is currently checking for UltimateVCTFFactory to check for AsVehicleFactory instead if it's possible, so you can use the right factory in your map without too many changes.

DaveTheBlaze
Posts: 22
Joined: Sun 15. Mar 2020, 18:28
Description: CovidFreeMapper

Any mappers / scripters alive and/or active?

Post by DaveTheBlaze » Wed 18. Mar 2020, 22:32

GLoups! wrote:
Wed 18. Mar 2020, 22:01
I suggested to make a subclass of UltimateRadarMap in unrealed and override the simulated event PostBeginPlay() who is currently checking for UltimateVCTFFactory to check for AsVehicleFactory instead if it's possible, so you can use the right factory in your map without too many changes.
Well, it doesn't seem I get the script running after having it to look for the ASVehicleFactory instead. Guess it's time to contact Crusha ^^.
But thanks for your help and time. If I ever get to release the map your name will be part of the honourable mentions :) :D.

User avatar
Crusha K. Rool
Posts: 118
Joined: Sun 28. Aug 2011, 23:14
Description: Coding Crocodile
Location: Germany

Any mappers / scripters alive and/or active?

Post by Crusha K. Rool » Sun 22. Mar 2020, 13:16

I haven't looked at the code in a long time, but I don't think it will work out of the box with a regular ASVehicleFactory.

The system basically works by creating a UltimateRadarVehicleLRI upon spawning a vehicle and attaching it to it. LRI means LinkedReplicationInfo. The UltimateRadarMap goes through this linked list of actors and draws something for each of them (the UltimateRadarMapMarker hijacks that principle by just inserting an LRI in order to draw a custom texture on the radar without actually having a vehicle). The LRI is attached to the vehicle and set to always be relevant to other players, so you know the location and rotation of the LRI (and thus its vehicle) even when the server did not replicate the position of the actual vehicle.

If you wanted to get it to work with regular VehicleFactories, you could have a script that takes care of spawning the UltimateRadarVehicleLRIs itself for the relevant vehicles. You would need to constantly iterate some list on basically every Tick to find relevant vehicles and also keep track of whether they already have an LRI. If you are only interested in vehicles driven by players (since it's a racing mode), you could iterate through Level.ControllerList, check the Pawn of each controller and see if that is a vehicle or has a driven vehicle. That would seem better than iterating DynamicActors with a constraint on the Vehicle class, which could given even worse performance. You would then either need to hardcode the settings for the radar map texture, etc. or make them configurable in your actor for each vehicle class that is going to be used. If the vehicle associated with the LRI gets destroyed, the LRI will destroy itself shortly after (via the BaseChanged() event).

But yeah, aside from that, the problem is that the UltimateRadarMap will think that there is no need to track vehicles if there is not at least one of those factories. I could try to make it work better in a future release of UMTv2, but for now just overriding the initialization in a subclass seems the easiest way to go.
In hindsight, the whole check for bTrackVehiclesOnRadar in the UltimateRadarMapHUDOverlay seems obsolete. It would have been sufficient to check if the first element of the LRI chain is present... really shows that those were my first steps in programming back then.