# How to make charater spawn with vehicle on start

**URL:** <https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542>\
**Category:** The Toolbox\
**Created:** [September 29, 2019, 1:52pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542 "2019-09-29T13:52:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_32-bit\_guy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/the_32-bit_guy/32/7222_2.png) [@The\_32-bit\_guy](https://discourse.cataclysmdda.org/u/The_32-bit_guy)\
**Post date:** [September 29, 2019, 1:52pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/1 "2019-09-29T13:52:49Z")

</div>

How do I make a scenario mod where then charater spawns in or beside a specific vehicle on world start?

---

<div class="post-metadata">

**Author:** ![KorGgenT](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/korggent/32/12330_2.png) [@KorGgenT](https://discourse.cataclysmdda.org/u/KorGgenT)\
**Post date:** [September 29, 2019, 3:14pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/2 "2019-09-29T15:14:58Z")

</div>

one way is to spawn at a location that has a vehicle

---

<div class="post-metadata">

**Author:** ![Zhilkin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/zhilkin/32/3749_2.png) [@Zhilkin](https://discourse.cataclysmdda.org/u/Zhilkin)\
**Post date:** [September 29, 2019, 7:51pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/3 "2019-09-29T19:51:53Z")

</div>

Try using map extra.

---

<div class="post-metadata">

**Author:** ![dpwb](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/dpwb/32/2609_2.png) [@dpwb](https://discourse.cataclysmdda.org/u/dpwb)\
**Post date:** [October 1, 2019, 12:17pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/4 "2019-10-01T12:17:44Z")

</div>

Theres no real code support for this to specify a vehicle that spawns with th eplayer on world start.

Itd be easy to add - I did similar with starting pets.

But then you get into a situation where you cannot guarantee theres enough space to spawn it nearby, depending on what is specified., thats the tricky bit.

As others have said - You could make a mod that has a start location where its guaranteed to spawn in that map.

---

<div class="post-metadata">

**Author:** ![FreyaValentine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/freyavalentine/32/7094_2.png) [@FreyaValentine](https://discourse.cataclysmdda.org/u/FreyaValentine)\
**Post date:** [October 1, 2019, 5:07pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/5 "2019-10-01T17:07:44Z")

</div>

If you really want a vehicle at the start and want to go the easiest route, you can just debug it in after you spawn and then just not use debug again. Other people might frown on this but, is the easiest option for doing what you want.

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [October 1, 2019, 5:44pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/6 "2019-10-01T17:44:15Z")

</div>

That’s not precisely true.

Scenarios can define a map extra that gets run on scenario start.  
Map extras can run `update_mapgen` though there aren’t any examples of that right now.  
`update_mapgen` can spawn vehicles or NPCs.

I think the relevant JSON is something close to:

```auto
  {
    "type": "scenario",
    "ident": "got_a_car",
    "map_extra": "mx_start_cart"
  },
  {
    "id": "mx_start_car",
    "type": "map_extra",
    "generator": { "generator_method": "update_mapgen", "generator_id": "um_start_car" }
  },
  {
    "type": "mapgen",
    "update_mapgen_id": "um_start_car",
    "method": "json",
    "object": { "place_vehicles": [{ "vehicle": "car", "x": 15, "y": 15, "chance": 100, "status": 1 }] }
  }

```

(I’m omitting the bits that aren’t relevant here like the scenario description, etc) but I haven’t really tested it and I don’t know if it will work.

---

<div class="post-metadata">

**Author:** ![The\_32-bit\_guy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/the_32-bit_guy/32/7222_2.png) [@The\_32-bit\_guy](https://discourse.cataclysmdda.org/u/The_32-bit_guy)\
**Post date:** [October 17, 2019, 7:09pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/7 "2019-10-17T19:09:12Z")

</div>

Is there also a way to spawn friendly npcs with this?

---

<div class="post-metadata">

**Author:** ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)\
**Post date:** [October 17, 2019, 7:31pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/8 "2019-10-17T19:31:19Z")

</div>

Sure, define the NPC as a member of the `"your_followers" `faction, set their first topic to `"TALK_FRIEND"`, and set their attitude to 4. The have the `update_mapgen` bit use `"place_npcs"` instead of `"place_vehicles"`.

---

<div class="post-metadata">

**Author:** ![Mantar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mantar/32/42_2.png) [@Mantar](https://discourse.cataclysmdda.org/u/Mantar)\
**Post date:** [October 18, 2019, 4:48pm UTC](https://discourse.cataclysmdda.org/t/how-to-make-charater-spawn-with-vehicle-on-start/21542/9 "2019-10-18T16:48:47Z")

</div>

Profession: Gang Leader
