Author Topic: Datablock Changing Tutorial  (Read 1487 times)

Just because some people don't know how and I dont want to see those add-ons. Have you wondered how to keep your old default add-ons and the new? Well you change datablock names! Here is a basic jeep script part:
Code: [Select]
datablock WheeledVehicleData(JeepVehicle)
{
category = "Vehicles";
displayName = " ";
shapeFile = "./shapes/jeep.dts"; //"~/data/shapes/skivehicle.dts"; //
emap = true;
minMountDist = 3;
   
   numMountPoints = 7;
   mountThread[0] = "sit";
   mountThread[1] = "sit";
   mountThread[2] = "sit";
   mountThread[3] = "sit";
   mountThread[4] = "sit";
   mountThread[5] = "root";
   mountThread[6] = "root";
   mountThread[7] = "sit";

maxDamage = 200.00;
destroyedLevel = 200.00;
energyPerDamagePoint = 160;
speedDamageScale = 1.04;
collDamageThresholdVel = 20.0;
collDamageMultiplier   = 0.02;

massCenter = "0 0 0";
   //massBox = "2 5 1";
Once it is edited, it is all correct but it will not show the jeep if you dont change the datablock. This is what a datablock name looks like:
Code: [Select]
datablock WheeledVehicleData(JeepVehicle) To change datablock names change the part that says "jeepvehicle" to the name of your vehicle:
Code: [Select]
datablock WheeledVehicleData(poopmobileVehicle) You may want to keep the vehicle part because you will soon have multiple datablocks in the script that you need to keep track of. Remember to change the other datablocks in the script.
EDIT: To mimic datablocks just type this:
Code: [Select]
datablock WheeledVehicleData(PoopMobileVehicle : JeepVehicle)
{
     //Only the values from the Jeep that you want to change go here.
};
You do not need the stuff after the // part but you do need }; at the end so it activates because if it has // it is just notes and stuff. Thanks to Trader for the mimic thing!
« Last Edit: October 31, 2007, 04:36:06 PM by Marcem »


Show people how to mimic datablocks please.

i just found that out last week without a tutorial  :cookieMonster:
but i think this should be stickied aswell,should help the people who are new to scripting

Code: [Select]
datablock WheeledVehicleData(PoopMobileVehicle : JeepVehicle)
{
     //Only the values from the Jeep that you want to change go here.
};

The only trick here is that the Jeep needs to be enabled.

You'll want to do a check for whether or not it is enabled, and, if not, exec it, then set its uiName to "".  If you are unsure how to do this, check out the code in Space Guy's Dual Guns Add-On.
« Last Edit: October 31, 2007, 10:05:17 AM by Trader »

If you only want to change ONE thing type JeepVehicle.maxDamage = 100.00;.

That would change the Jeep's "health" not the "Poop Mobile's" health.

Bump so people can see this.

can someone make a poopmobile vehicle?


I had no idea you could mimic  :cookieMonster: