Some questions about mods

I need help with some stuff for a mod I’m working on, if anyone would like to join the project I’d appreciate it, if anyone could link me to a post that has to do with what I’m going to ask I’d also appreciate it

The map is a team killmatch where everyone appears without weapons and must pick one up and defend or attack the enemy base

1 How can I make the teams respawn without weapons? I saw the custom team thing but I only want it to be one soldier, like in gungame

2 How can I adjust the amount of ammo on a weapon with pay loot, they usually come unloaded, the only ones that have ammo were the zombie ones

3 Can you put the spinning animation like the one on the Halloween tokens on a weapon with pay loot?

4 Can you do a mission with two bombs? that one team must detonate the bomb for the other at the same time

5 How can I configure that players can only carry one weapon, and that when picking up another it is changed for this one and not put in slot 2

6 How can I deactivate that when picking up a weapon the one you had in your hand is thrown to the ground?

7 How can I move the camera on the minimap?

1 Like
  • Add custom profile with soldiers that have only melee weapon (to avoid problems with soldier anims). For that you will need to create custom_profile entity and add path to file (for example %ugm/profile.json) that should be inside your mod folder (with scene.blk). Here’s some code for profile, but i’m not 100% sure that it correct. If it works in custom match (in editor it will not work) then you can edit equipment, perks, inventory and e.t.c.
    profile.txt (12.1 KB)
    Weapons already changed.

More info about profile you can find here: Custom Profiles - Another look (Guide)

  • Another one and worse way: add gun_game_mode_logic and clean gun_game__levels, except first one (it should contains melee weapon and giant kill amount). You also can edit (increase to 999999) gun_game__resetSpawnsTimeout if you don’t want random respawn points.

If you know how to edit scene.blk then here’s some code:

entity{
  _template:t="gun_game_mode_logic"
  gun_game__resetSpawnsTimeout:r=999999

  "gun_game__levels:array"{
    "gun_game__levels:object"{
      weaponSlot:t="melee"
      levelKills:i=999

      "weapons:list<t>"{
        item:t="knife_weapon"
      }
    }
  }
}

You will need to create entities.blk (link to guide with more info about it) file and do a bit code. Some example:

dp_27_halloween_gun_item{
  _override:b=yes

  _group{
    _tags:t="server"

    "gun__initialAmmoHoldersCount:list<i>"{
      item:i=4
    }
  }
}

Property gun__initialAmmoHoldersCount and item:i=4 - ammo that you will receive after pickup.

Like before: you will need to use entities.blk. And add this code to your weapon:

  token_free__rotationSpeedDegPerSecond:r=30.0

  "token_free__tag:tag"{
  }

Some example:


nagant_m1895_zombie_gun_item{
  _override:b=yes

  token_free__rotationSpeedDegPerSecond:r=30.0

  "token_free__tag:tag"{
  }

  _group{
    _tags:t="server"

    "gun__initialAmmoHoldersCount:list<i>"{
      item:i=5
    }
  }
}

BUT: Probably better to make seperate entity for pickup and drop. Because weapon keeps spinning. As result you may see something like it:


So probably better to do code looks something like that:

nagant_m1895_zombie_gun_item{
  _override:b=yes

  _group{
    _tags:t="server"

    "gun__initialAmmoHoldersCount:list<i>"{
      item:i=5
    }
  }
}

nagant_m1895_zombie_pickup_gun_item{
  _use:t="nagant_m1895_zombie_gun_item"

  token_free__rotationSpeedDegPerSecond:r=30.0

  "token_free__tag:tag"{
  }
}

Yeah? Need to set same groupName and turn on capzone__checkAllZonesInGroup and then team must destroy both boms for capture sector… Or you really mean that two bombs should be detonated at one time for progress? Then probably nope + it will be extremely hard for players.

Probably it will be easier and better to use custom profile.

In human_weap__weapTemplates you can add weapons for soldier. Here’s code example:

            "human_weap__weapTemplates": {
              "grenade": "grenade_thrower",
              "melee": "usa_knife_weapon",
              "primary": "",
              "secondary": "block_slot_weap",
              "tertiary": ""
            },
  • block_slot_weap - disables secondary slot.

Ah. Then in 3 forgot about seperate entity (i’m about …_pickup_gun_item). Well… I need to check something to be sure. Yeah. I don’t know, but I remember that some old ai soldiers doesn’t drop weapons.

You mean move minimap image? If yes then i’m not sure that it possible, but probably need to edit minimap entity. You can find it using Find Entity tool.


Or did you mean something else? Respawn camera?

2 Likes

Thank you very much, what I mean by two bombs is that both teams must plant and detonate the opponent’s bomb, in a normal mission there is only one attacking team and one defending team, what I am looking for is that both attack and both defend at the same time, the one who detonates the other’s bomb wins.

1 Like

Using entities.blk you can override soldiers entities and disable human_inventory__dropsLoot. Code for usa soldiers will be looks like:

usa_base_soldier{
  _override:b=yes

  human_inventory__dropsLoot:b=no
}

Also thanks you:

Found a way to drop the entire inventory.

Old soldiers doesn’t have these tags:


Need to recreate soldier entity, but without these tags. And after death they should drop all inventory.


Ah. Then yeah. It’s should be possible to do.

Probably don’t need to add groupName or create group_activator entities, but if bombs aren’t activated then try to add two different group_activator and setting different groupNames to your capture points properties.

Don’t forgot to edit team entities and set team__capturePenality = team__score to make team loses after first sector (bomb). And clean team__squadSpawnCost if you don’t want points lose when player/bot spawns. It depends on players & bot amount in battle: your number/players+bots = result that will reduce points. For example: you set team__capturePenality = 100 and there will be 50 players & bots on the server then team (that contains team__capturePenality = 100) should lose only 2 point.

2 Likes

I would like to join in on your development (if it is still needed)
You can send me a direct message by clicking on my profile photo. I am happy to provide all the help you need, such as installing the player profile and stuff

1 Like