Log in to reply
 

How to make spawn new taxis vehicles in traffic ?



  • Hi everyone, for those who didn't notice Gta 5 is the first gta which have only one taxi model which is not realistic, for exemple in Gta 4 you have 3 different taxi model, i want to know there is a way to add new taxi vehicles in traffic ?



  • @gti92
    Find 'vehiclemodelsets.meta' here:

    ...\Grand Theft Auto V\mods\update\update.rpf\common\data\ai\vehiclemodelsets.meta

    & add new vehicles to the 'taxi' 'CAmbientModelSet' within it:

    Default 'vehiclemodelsets.meta' 'taxi' 'CAmbientModelSet':

        <Item type="CAmbientModelSet">
          <Name>taxi</Name>
          <Models>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
          </Models>
        </Item>
    

    Example (new taxi vehicles added):

        <Item type="CAmbientModelSet">
          <Name>taxi</Name>
          <Models>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi2</Name> <!-- 2nd taxi added -->
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi3</Name> <!-- 3rd taxi added -->
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi4</Name> <!-- 4th taxi added -->
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
          </Models>
        </Item>
    

    The game will then choose one at random when the 'taxi' 'CAmbientModelSet' is called/spawned.

    Note:

    • You can add any vehicle/vehicle name. They don't have to be called taxi1/2/3/4 etc. Any name will work.
    • I'm not confident the '<Probability value' works as you might think, by allowing you to control the probability of one vehicle spawning over the others (can't remember if it works :thinking:). Feel free to try it, if you need it etc, but if it doesn't make a difference you can always duplicate entries & control the car to car spawn ratio that way.

    ie, for example, enter 'taxi2' etc twice:

            <Item>
              <Name>taxi2</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi2</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
    

    & it will have twice the chance of spawning compared to any other single entry vehicle/s in that 'taxi' 'CAmbientModelSet' section.



  • @a63nt-5m1th said in How to make spawn new taxis vehicles in traffic ?:

    @gti92
    Find 'vehiclemodelsets.meta' here:

    ...\Grand Theft Auto V\mods\update\update.rpf\common\data\ai\vehiclemodelsets.meta

    & add new vehicles to the 'taxi' 'CAmbientModelSet' within it:

    Default 'vehiclemodelsets.meta' 'taxi' 'CAmbientModelSet':

        <Item type="CAmbientModelSet">
          <Name>taxi</Name>
          <Models>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
          </Models>
        </Item>
    

    Example (new taxi vehicles added):

        <Item type="CAmbientModelSet">
          <Name>taxi</Name>
          <Models>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi2</Name> <!-- 2nd taxi added -->
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi3</Name> <!-- 3rd taxi added -->
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi4</Name> <!-- 4th taxi added -->
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
          </Models>
        </Item>
    

    The game will then randomly choose one when a taxi spawn is called.

    Note:

    • You can add any vehicle/vehicle name. They don't have to be called taxi1/2/3/4 etc. Any name will work.
    • I'm not confident the '<Probability value' works as you might think, by allowing you to control the probability of one vehicle spawning over the others (can't remember if it works :thinking:). Feel free to try it, if you need it etc, but if it doesn't make a difference you can always duplicate entries & control the car to car spawn ratio that way.

    ie, for example, enter 'taxi2' etc twice:

            <Item>
              <Name>taxi2</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
            <Item>
              <Name>taxi2</Name>
              <Variations type="NULL" />
              <Probability value="1.000000" />
            </Item>
    

    & it will have twice the chance of spawning compared to any other single entry vehicle/s in that 'taxi' 'CAmbientModelSet' section.

    ok thank you very much man i'll try this



  • @gti92
    You probably want to add your extra taxis to the 'VEH_TAXI' section in 'popgroups.ymt' as well. Maybe the 'VEH_TRANSPORT' one too, but I would probably test just the 'VEH_TAXI' section on it's own first. :thumbsup:

    ...\Grand Theft Auto V\mods\update\update.rpf\x64\levels\gta5\popgroups.ymt

    VEH_TAXI:

        <Item>
          <Name>VEH_TAXI</Name>
          <models>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL"/>
            </Item>
          </models>
          <flags>POPGROUP_SCENARIO POPGROUP_AMBIENT</flags>
        </Item>
    

    VEH_TRANSPORT:

        <Item>
          <Name>VEH_TRANSPORT</Name>
          <models>
            <Item>
              <Name>bus</Name>
              <Variations type="NULL"/>
            </Item>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL"/>
            </Item>
          </models>
          <flags>POPGROUP_SCENARIO POPGROUP_AMBIENT</flags>
        </Item>
    

    As long as it actually works (it should, I've just never tested it etc), I think 'popgroups.ymt' will get you the most pronounced results, should have mentioned that first tbh, but feel free to experiment with 'popgroups.ymt' &/or 'vehiclemodelsets.meta' & see what one or combination gets you the best results :thumbsup:



  • @a63nt-5m1th said in How to make spawn new taxis vehicles in traffic ?:

    @gti92
    You probably want to add your extra taxis to the 'VEH_TAXI' section in 'popgroups.ymt' as well. Maybe the 'VEH_TRANSPORT' one too, but I would probably test just the 'VEH_TAXI' section on it's own first. :thumbsup:

    ...\Grand Theft Auto V\mods\update\update.rpf\x64\levels\gta5\popgroups.ymt

    VEH_TAXI:

        <Item>
          <Name>VEH_TAXI</Name>
          <models>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL"/>
            </Item>
          </models>
          <flags>POPGROUP_SCENARIO POPGROUP_AMBIENT</flags>
        </Item>
    

    VEH_TRANSPORT:

        <Item>
          <Name>VEH_TRANSPORT</Name>
          <models>
            <Item>
              <Name>bus</Name>
              <Variations type="NULL"/>
            </Item>
            <Item>
              <Name>taxi</Name>
              <Variations type="NULL"/>
            </Item>
          </models>
          <flags>POPGROUP_SCENARIO POPGROUP_AMBIENT</flags>
        </Item>
    

    As long as it actually works (it should, I've just never tested it etc), I think 'popgroups.ymt' will get you the most pronounced results, should have mentioned that first tbh, but feel free to experiment with 'popgroups.ymt' &/or 'vehiclemodelsets.meta' & see what one or combination gets you the best results :thumbsup:

    actually for dlc vehicles i was doing it with popgroups and it worked perfectly, but i've just tried with vehiclemodelsets and the new taxi i added didn't spawn in traffic, i added new line in the vehicle.meta but it didn't spawn in traffic, i'm gonna try with poproug



  • @gti92 Check the spawn values of the vehicle you're trying to add in the corresponding dlcpack vehicle.meta or in the base game vehicle.meta as that is a contributing factor into the frequency and amount of how many times the vehicle model you want spawning (along with the swankness and vehicle flags).

    You can pretty much put the vehicle model you want to add where ever the Taxi model is at in vehiclemodelsets and popgroups and the game will spawn the new taxi model wherever the popgroup and vehiclemodelsets wants taxis to spawn at.

    Also, just to let you know that though this might be irrelevant, you can't actually use the other vehicle you add as a taxi and it can't take you anywhere as the Stanier Taxi is hardcoded to be the only vehicle to be able to operate as a taxi and teleport you around.



  • @Ethical said in How to make spawn new taxis vehicles in traffic ?:

    @gti92 Check the spawn values of the vehicle you're trying to add in the corresponding dlcpack vehicle.meta or in the base game vehicle.meta as that is a contributing factor into the frequency and amount of how many times the vehicle model you want spawning (along with the swankness and vehicle flags).

    You can pretty much put the vehicle model you want to add where ever the Taxi model is at in vehiclemodelsets and popgroups and the game will spawn the new taxi model wherever the popgroup and vehiclemodelsets wants taxis to spawn at.

    Also, just to let you know that though this might be irrelevant, you can't actually use the other vehicle you add as a taxi and it can't take you anywhere as the Stanier Taxi is hardcoded to be the only vehicle to be able to operate as a taxi and teleport you around.

    I don't know why but it didn't work, I mean I can spawn it from a trainer but it will not spawn naturally, I think it's better to replace the new taxi into a vehicle that is already in the vehicles.meta for exemple the sentinel or the stanier.

    I didn't know that the taxi script was hard-coded


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.