Forum Mod Bakery Docs

Add more car sellers

Posted in Support
Please login to contribute to the conversation.
I want to add another car seller in the first level. I have created a new car and I want to add a character that would sell it. I don’t want to replace Gil or Barney.
Right now, I have been able to put the character in the map, but when I interact with the character it would sell me the Barney’s car.
I created a rewards.mkf file in “AdditionalFiles\scripts\missions” that says:

//BindReward( <name>, <filename>, <reward type>, "forsale", <level>, <coin cost>, <seller> );
BindReward( "mycar", "art\cars\mycar.p3d", "car", "forsale", 1, 5, "flanders" ); //Ned
//SetCarAttributes(<top speed>, <acceleration>, <toughness>, <handling>);
SetCarAttributes( "mycar", 3, 2, 3, 3 );

I also created a leveli.mkf file in “AdditionalFiles\scripts\missions\level01” that says:

//ADDING VEHICLE PURCHASE POINTS
AddPurchaseCarReward( "flanders", "ned", "npd", "ned_loc", 1.3, "ned_car" );
AddPurchaseCarNPCWaypoint("ned", "ned_walk1");

And I also created a CustomShopSupport.xml file. I don’t know if this is necessary, but it lets me disable Barney’s dialogue so it doesn’t play when I talk to Flanders. The problem is that it also disables the dialogue when I interact with Barney.

<CustomShopSupport>
<CarShop Level="1" Conversation="" Character="reward_ned"/>
</CustomShopSupport>
The problem lies that the game binds rewards to "gil" or "simpson"

BindReward( "plowk_v", "art\cars\plowk_v.p3d", "car", "forsale", 1, 150, "simpson" ); //Barney
BindReward( "cDuff", "art\cars\cDuff.p3d", "car", "forsale", 1, 125, "gil" );
BindReward( "cVan", "art\cars\cVan.p3d", "car", "forsale", 1, 100, "gil" );

As far as I understand, CustomShopSupport currently only allows you to add a custom NPC that would replace Barney (or the other shops in other levels).
The thing is that if I change the “flanders” part in rewards.mkf and leveli.mkf files to “simpson” the NPC would sell me Barney’s car and my car, which, obviously, is not what I want.
Do you think that only having two car sellers per level is hard codded into the game?
Right -- I'm saying that you can only have 2 shops; Gil and whatever 'simpson' character the game or you've assigned.

CustomShopSupport only allows overriding who the 'simpson' is; i.e. instead of Barney, Flanders can sell the 'simpson' group of cars.