Jump to content


Photo

[Tutorial] Multi Turret vehicle setup


  • Please log in to reply
No replies to this topic

#1 ReKoil

ReKoil

    C&C Renegade Corn Supplier

  • Senior Moderators
  • 909 posts
  • Steam:
    rekoil637
  • Location:
    Hoorn, Netherlands

Posted 26 May 2014 - 01:48 PM

Welcome to the third and final part of this tutorial series. The first part was modelling a vehicle, the second part was boning a vehicle and this part will cover the multi turret setup. The final result of these tutorials is in a video at the bottom of the post.

For this part you will need RenX, LE and XCC mixer.

----Phase 1: Boning your additional turrets---

Now before we start boning the turrets, we are going to want to resize our turrets to keep them looking good, size wise, in comparison to the main vehicle. If you have not resized your vehicle during the boning tutorial and your turrets are thus still the right size, skip this.

Open up your turret scene in gmax. Go to File -> Merge. Select your vehicle model in the menu that pops up and click Open. You will see a list of everything in your vehicle scene. Select your chassis and click OK.

http://i1141.photobu...ultiturret1.png
http://i1141.photobu...ultiturret2.png
http://i1141.photobu...ultiturret3.png

You will see your chassis in the turret scene now. Depending on whether you made 1 or multiple turret models you will want to resize one of each different turret model. I only have one turret model which I will put on my vehicle four times in LE. Delete any unnecessary turret models from the scene, in my case all but 1.

http://i1141.photobu...ultiturret4.png

Now use the rescale tool to resize your turret to the size you want in comparison to the chassis. Be sure to select both the turret and the barrels. Below is my resized turret. It is a bit bigger than before.

http://i1141.photobu...ultiturret5.png

Once your are happy with its size, deselect it, select your merged chassis and hit delete on your keyboard to get rid of it.

Now reposition you turret to 0,0,0 if it is not already. The end result I have is not how I want it. So I go to the hierarchy tab, click affect pivot only and click center to object. The result is still not how I want it but at least the pivot of my turret is now centered. Now deselect pivot only and place the turret at 0,0,0
again. Do not do this for the barrels.

If we leave it as it is now it will be created like this on the vehicle (depending on where you place the bone for it, more on this later), as in, everything below Z 0 will be inside the vehicle. So use the select and move tool to drag your turret up. To see how close your bottom of the model is to Z 0 I'd recommend going to
the modifier tab and clicking on vertex in your editable mesh and then selecting on of your bottom vertexes to see how high it is. Mine is a -0.002. Meaning the bottom of my turret will be slightly inside the vehicle, which is desirable (so that you do not see a small gap between the turret and the main vehicle). Now deselect the vertex button and back out of your editable mesh. We only did this to check the height, we were not actually going to change anything. If your turret
bottom is not near Z 0 enough yet after one change just keep dragging it up (or down depending on whether it is to high or to low :3) and keep checking it in editable mesh over and over till it is right. Keep in mind that this turret I am making will be created on top of the chassis. If you have a vehicle where you create them underneath (A VTOL perhaps?), you will want to do the opposite: make sure everything is is close enough to z 0 underneath. They can also be placed on the sides of course.

Note: your pivot may have been on a different spot than mine originally was if you converted the other object our turret was made up of to editable mesh and used that to attach the second object, back in the boning tutorial.

http://i1141.photobu...ultiturret6.png
http://i1141.photobu...ultiturret7.png

Now reposition your barrel manually to look good on your turret again.

http://i1141.photobu...ultiturret8.png

Now to bone our turret. We will be Xreffing all necessary bones from the mammoth tank again. Only this time, in addition, we will also be Xreffing the seat0 bone. I do not know how necesary this bone is (you might not even need it at all), but the Reborn turrets I used as reference for what bones I needed did have them. Also, obviously, we will not be needing wheel bones.

So go to Xref again, click add, navigate to the mammoth model and click open.
Now select:
-Origin.00
-Boundingbox.00
-seat.00
-turret.00
-Barrel.00
-MuzzleA0.00
-MuzzleA1.00 (or not, depending on how many barrels your turret has, mine has 2 primary barrels so I take both).
-MuzzleB0.00 (if you want your additional turret to have a secondary weapon. In my case I am omitting it).
-MuzzleB1.01 (if your secondary weapon has 2 barrels).
-Worldbox.00

Select these (hold control down to select multiple). and click OK.

http://i1141.photobu...ultiturret9.png
http://i1141.photobu...ltiturret10.png
http://i1141.photobu...ltiturret11.png
http://i1141.photobu...ltiturret12.png
http://i1141.photobu...ltiturret13.png

Select all the bones we just picked again and click merge. Click OK in the confirmation pop-up. Close the Xref window.

http://i1141.photobu...ltiturret14.png

Now zoom out to see all Xreffed bones. We are going to have to resize them all again. Start with the WorldBox and the Boundingbox since you can resize those the easiest (on the modifier tab). Below screenies show the values of my resizes and repositioned worldbox and boundingbox. Also cut the .00 of the end of their names while you are on this tab anyway (keep doing this for the next bones as well).

You will notice my worldbox does not cover my barrels entirely. Muzzle bones are also allowed outside the worldbox as well as the seat bone. They just have to be inside the boundingbox (obviously). Also, in case you forgot. Use 'h' to select you boxes and bones easier.

With the boundingbox you will have to go to the hierarchy tab again and affect pivot only -> center to object and then deselect affect pivot only and then reposition it to 0,0,0 to get the boundingbox to show up at the proper spot. You will probably have to do this repeatedly while you keep resizing it (plus again when it is finally the right size).

http://i1141.photobu...ltiturret15.png
http://i1141.photobu...ltiturret16.png
http://i1141.photobu...ltiturret17.png

Next use the resize tool and resize the turret bone. It's children will be resized automatically as well. Once it is small enough go to hierarchy and click Dont affect children. Now drag it to where you want the bottom of your additional turret to meet the chassis. This is the best spot for the turret rotation bone.

http://i1141.photobu...ltiturret18.png
http://i1141.photobu...ltiturret19.png
http://i1141.photobu...ltiturret20.png

Next move the barrel bone to the edge of where the barrels meet the turret (mesh). Then move the muzzle bones to the barrel edges on the outside. Line the muzzle bones up with the barrels manually if necessary. Last screenie below is just to show that the muzzle bones are outside the worldbox but still inside the
boundingbox.

http://i1141.photobu...ltiturret21.png
http://i1141.photobu...ltiturret22.png
http://i1141.photobu...ltiturret23.png
http://i1141.photobu...ltiturret24.png

Next resize the origin bone (this one can be done on the modifer tab again) and the reposition it to 0,0,0. Center the pivot to object if necesary (it was in my case). If your origin is small enough and it does not fit inside the worldbox, just drag everything youve placed so far minus the origin down a bit so that the origin
does end up inside the worldbox.

http://i1141.photobu...ltiturret25.png
http://i1141.photobu...ltiturret26.png
http://i1141.photobu...ltiturret27.png
http://i1141.photobu...ltiturret28.png

As you can see on the last screenie above the turret and origin bone overlap each other quite a bit. Bones that partially or wholly occupy the same space can have unwanted side effects. However, that luckily is not the case with the origin and turret bones since they do not interact with each other directly. Which is more or less the requirement for side effects with overlapping bones (this explanation I borrowed from sarah :3).

Now, lastly, resize the seat bone and rename it Seat0 (so drop off the .00 and add a 0 behind seat and capitalize the S). Then reposition it somewhere in the top part of your turret. This one is also allowed a bit above your turret and outside the worldbox (but inside the boundingbox of course).

http://i1141.photobu...ltiturret29.png

Now we have to Link everything again:

-The Worldbox is linked to origin.
-The BoundingBox is linked to origin.
-Seat0 is linked to origin.
-Turret(bone) is linked to origin.
-Barrel and v-turret are linked to turret (bone).
-MuzzleA0 and A1 (if you have it)(bone(s)) and v_barrels are linked to barrel(bone).
-MuzzleB0(bone) is linked to v-turret OR
-MuzzleB1(bone) is linked to barrel (bone), depending on your setup. I could have put one Muzzle A bone on one of my barrels and made the other a Muzzle B bone.

As you can see there are some differences here compared to linking the main vehicle. Mainly because your turret does not have a chassis, or wheels, or wheel bones.

To recap linking: click 'h' (make sure you check the box next to display subtree), select the object to be linked under the other object, click select to select it and close the menu, click the select and link button, and click the object to be linked to by pressin h again and selecting it there and clicking link. On the screenies below I am linking the worldbox to the origin.

http://i1141.photobu...ltiturret30.png
http://i1141.photobu...ltiturret31.png

Now select any other tool on the toolbar, such as for example the rotate tool, and press h again. You will now see worldbox linked under origin.

http://i1141.photobu...ltiturret32.png

Now link the rest as described above. End result below:

http://i1141.photobu...ltiturret33.png

Now select everything, go to hierarchy tab, click affect pivot only (you will notice now on your scene that not everything is aligned) and click align to world (and click affect pivot only again to deselect it). Now unselect everything and select your origin, go to w3d export settings and check the export transform (bone)
option.

http://i1141.photobu...ltiturret34.png
http://i1141.photobu...ltiturret35.png

Your export options for your barrels and turret should already be put on projectile (and nothing else) since we already did that in the previous tutorial, but you can doublecheck if you want.

Now, we are ALMOST done with Renx. But we ARE done with our turret model. Unless you have two different turrets, in which case you can do all this again for the second one (and save that as a different scene of course). We just need to export now. Click Export (always save first before exporting) and scroll to your mod folder. Name your turret something and click Save. Select hierarchical model just like with the main vehicle and click OK.

http://i1141.photobu...ltiturret36.png
http://i1141.photobu...ltiturret37.png
http://i1141.photobu...ltiturret38.png

----Phase 2: Adding a few more bones to the host vehicle----

Now, open your main vehicle's scene (or host vehicle) = the vehicle that will have the turrets attached to them. We need to do a few additional things here. We need to place some additional 'bones' for the multi turret script to work. I put bones in brackets because technically, they are not really actual 100% bones.
Heck, we're even gonna make them ourselves. Create a box of 0.2 x 0.2 x 0.2 (at least, these values were desirable for my vehicle). Below is my box positioned above the boundingbox.

http://i1141.photobu...ltiturret39.png

Clone your box three times, or however many times you need for the ammount of turrets you are going to place. There probably is a limit on the ammount of turrets, but on sarah's flying spaceship thingie I believe the ammount of attached turrets was around 12 (amittedly, that was ofc with her own script, not the one we will be using since the general public does not have that script (plus that it also crashed the server in my tests) :3). Just to give you a rough limit :3

http://i1141.photobu...ltiturret40.png

The names do not matter yet, so when cloning, in the pop up, just click ok. Remember that clones are created at the exact same spot as the original, so you will have to move them a bit to see them. Position one of the boxes where you want on the chassis. Below is where I am putting mine. I will be placing my additional turrets in a square around the main one. Try to sink the box into the chassis a bit, preferably with the pivot right on the height of the top of the chassis for the best look.

http://i1141.photobu...ltiturret41.png

You CAN also place a bone on top of the vehicle turret to make an additional turret. The only problem(s) that you can easily run into is the camera or turret aim (or even both at the same time), depending on how you place it and how the turrets operate, and of course, depending on wether it is player controlled or not. So you'd have to make sure that they don't interfere/conflict with each other. BUT, aside of that it can be done perfectly fine.

Now, you should still have your bone-to-be selected. Go to the w3d export options and check the export transform (bone) option and export geometry box as well (both should be checked by default, but if not, check them). Next, under geometry options click hide. Now repeat with the other bone-to-be's.

http://i1141.photobu...ltiturret42.png

As you can see we are checking export geometry and the hide option. Another indicator these aren't true bones :3 We need to select export geometry for the additional turrets to pop up alright and function. We need to click hide so we do not see the hideous bone with our naked eyes ingame :3

Now rename your fake bones. I'm using Tur_Front1, Tur_Front2, Tur_Rear1 & Tur_Rear2 as names. It does not matter what you name them. It only matters that the name does not exceed 16 characters, as with every object in your RenX scene. Also the name of your exported models in RenX have to abide by that same limit :3

Anyways, make sure you copy paste your bone names, whatever you name them, into a notepad file or write them down or something. We will need the EXACT names later on in LE (yes, case sensitive). Screenie of my names below. You will also see they are not linked. We do not need to link these fake bones, unless we wish to have special effects on them like rotate with the main vehicle turret or something. I am keeping them unlinked.

http://i1141.photobu...ltiturret43.png

Next, place your other 3 bones where you want them. If you wish to space them out evenly copy paste the x,y and z co-ordinates of the bone you already placed into them and adjust the values with minuses etc. End result:

http://i1141.photobu...ltiturret44.png

Now we have to resize the worldbox. The worlbox size as we did it in the boning tutorial is the desired size for a non multi turret vehicle. However, if you do this for a multi turret vehicle, the additional turrets will not be exitable. Below is my resized worldbox. The turret spawn bones HAVE to be outside it. Also, you have to put them far enough outside so that not just the bone is outside, but that there is also enough space for the turret mesh to be outside it.

http://i1141.photobu...ltiturret93.png

Now export your vehicle as hierarchical model again. We are now done with RenX. On to LE.

----Phase 3: LE Multi Turret setup----

Open your mod folder in LE. Navigate to where you put your main vehicle in the presets. Click it. Click temp. Name it something and click OK. I named it C&C_AnniTur. Now, If you have different turret models, click the main vehicle again and click temp once for every original turret model. Name those and click OK. I only have the one model for this vehicle.

Next open each of your temped turret presets with mod and go to the physics tab. Change the physics type to DecorationPhys and input your model. Now go to your script tab and click add and add the m00_diasble_physical_collision_jdg script. We need this so the host vehicle and turret do not get bugged stuck together. Click OK to apply your changes to your temp presets.

http://i1141.photobu...ltiturret45.png
http://i1141.photobu...ltiturret46.png
http://i1141.photobu...ltiturret47.png
http://i1141.photobu...ltiturret48.png

If you wish the turret to be AI rather than human controlled, also put the RA_Base_Defence_simple script on it to make it shoot (parameters are pretty self explanatory imo) and put m00_disable transition on it so players can not enter it. Example below.

http://i1141.photobu...ltiturret49.png

Now select the main vehicle, click mod and go to the scripts tab. Click add and select the dp88_spawnVehiclePart script. For the Vehicle_part_preset we fill in the name of our additional turret preset. For the Spawn_at_bone paramater we fill in one of our fake bone names we made in the previous phase, in my
case: Tur_Front1, Tur_Front2, Tur_Rear1 or Tur_Rear2. Both paramaters so far are case sensitive. The third parameter, IsDecorative is to be left at 0, if you want to actually use the turret. If you put it on 1 it will become decorative, and will thus not function properly as a turret.

http://i1141.photobu...ltiturret50.png
http://i1141.photobu...ltiturret51.png
http://i1141.photobu...ltiturret52.png

Now repeat this for your other turret name(s, if you have multiple models) and bones. And click OK to apply. If you wish the main vehicle to be AI use Neo_vehicle_AI and m00_disable transition.

http://i1141.photobu...ltiturret53.png
http://i1141.photobu...ltiturret54.png

And that is it for the scripts. The final part is a bit annoying, as it sometimes has to be pretty precise depending on the size of your vehicle, but it is not hard. We need to check our transition zones and resize them if necesary. This applies to both enter as well as exit zones. First the main vehicle. Click mod on its
preset. Go to the transitions tab. Select Vehicle_enter and click modify. The transition editor will open.

The keyboard controls for this editor are at the top right corner. You can see below that our zone is so big it fits
the entire vehicle plus way more. This means that if someone tries to enter the turret when standing close to it, they will be entering the host vehicle instead (the turret simply cannot be entered normally like this). To resize the zone click the size button and make it so that it fits the body better and also leaves open space for entering the turrets.

http://i1141.photobu...ltiturret55.png
http://i1141.photobu...ltiturret56.png
http://i1141.photobu...ltiturret57.png

Now, we are going to have to alternate between size and move zone probably a couple of times to get this right. Click size zone to deselect it. Move zone and move char should now still be selected. Move the zone to center it better on the vehicle. My zone is now on 0 x and y, and on 0.90 Z. It is sized pretty decently now, but we are going to adjust that a bit more. I size the height so heightwise the entire vehicle is inside. Then I adjust the width and length so that the front and back are sticking outside the zone, resulting in the vehicle being unable to be entered form the front or the back, and expand the zone to the side so that it is at 2 tiles, then I deselect size and move zone (so only move character stays on) and move the character to just inside the zone (the height of the char does not matter much I think). Final result below. Take note of the highlighted values in the second screenie, we will use these to resize and position our exit zones faster.

http://i1141.photobu...ltiturret58.png
http://i1141.photobu...ltiturret59.png

When done, click OK. Next, click the first vehicle_exit and click modify. Use the highlighted values of the second screenie above to reposition and resize your transition box faster. Make sure the character is outside the zone (it should already be). Here is my first exit transition resized and moved:

http://i1141.photobu...ltiturret60.png

Now rinse and repeat for the other exit zones. Even though our vehicle was already enterable and exitable (if you tested it after the boning tutorial) I am doing it here. We are lucky our APC was of similar size to the Westwood NOD apc so we have to do minimal adjusting.

Anyway, once you have done all enter and exit zones for your main vehicle we can now go on to your turret. Yep, we gotta do that all again. Told you this was going to be annoying :3 I forgot to mention it is also time consuming though ^^

For our turrets we are going to want smaller zones, if like me, you placed them (the bones they are spawned at) near the egde of your vehicle. If you placed them right in the middle or something like that, you are going to want to make them a bit bigger than I am doing. As you can see below our small turret has quite the enter zone.

http://i1141.photobu...ltiturret61.png

Now since we are using the same turret on all 4 places we need to make the zones big enough on either all sides, or at least 2 sides (either front and back or both sides, depending on your main vehicle zones). We need to do this because if we for example size and move the zone so that the turret is entered from the front, the rear turrets will not be enterable and vice versa. This can also be solved by making four temp turrets and making the zones individually for each. But that also means you will have extra transition zones to set up :3

Anyway let us make our zone super small in width (but still thick enough to contain the turret moddel), so that it can not be entered form the side. The main vehicle in my case is entered form the side after all and cannot be entered form the front or back. Which is why we do the opposite for the turret. As for the length, I do not quite think we will need the orginal size, so we will size that down a bit too.

http://i1141.photobu...ltiturret62.png
http://i1141.photobu...ltiturret63.png

This might still be a bit on the big size, but we will not truly know untill we try it out ingame. Now the problematic point. The height. The height is problematic because the turret is created at the bone and thus higher up than the host vehicle (in my model at least). Meaning our height will have to be adjusted accordingly. You might have to change and test the height a few times before you get it right (if it is not right you will not be able to enter the vehicle). Now on my
first try I am going to use the same height as on the main vehicle's transition zone. But, I will move it down a lot, so that the turret is in the upper part of the zone rather than the middle. Lastly reposition the character inside the zone. When done click OK.

http://i1141.photobu...ltiturret64.png
http://i1141.photobu...ltiturret65.png

Use the zone position and size of the enter zone again to more quickly setup the exit zones. Remeber, the exit character has to be outside the zone. I just left them where they were for my first test. You can also downsize the exit zone to barely fit the turret model. That is the only thing that matters for the zone itsself: it has to fit the additional turret model since that is where the exit transition starts. The more important thing here is the character model.

Now make your host vehicle once, or if you already have a level on which you tried your vehicle before, just load that and save level and export to mix.
Now there is one last thing that can go wrong. So let us check if it did (I am not sure if it always goes wrong, but it did also happen with my GDI heavy tank).

Open up your freshly exported map in XCC Mixer. Now check if your turret model is in it, as shown on my screenie below, it is not. I think this happens because the turret is not made directly in the level, but by a script in the temp preset. Just drag and drop the turret model into the xcc list using your windows explorer folders. This is also the same map I used to test my heavy tank. As you can see its turret models are also missing. Now do file -> close in XCC and then close XCC again. You can also see my additional turret model is now inside the mix in the second screenie. I also did the GDI heavy tank turrets as well to keep that vehicle whole :3
You will have to drag and drop in your vehicle's additional turrets with XCC EVERY time after you use export to mix.

http://i1141.photobu...ltiturret66.png
http://i1141.photobu...ltiturret67.png

The result so far is that I can get into the additional turrets just fine, but cannot get out. This means we are going to have to reposition those characters in the exit zone after all. (Also my turret spawn bones were inside the worldbox at this time, make sure it is not caused by that before doing the following).

You also saw that my vehicles were bumping up and down. This can be lag created by hosting and playing on the same computer (or just general FDS lag). To see if it is, try playing the map in multiplay LAN. In my case it was gone there. You also might have seen the enter zone of the host vehicle was a bit tight, but still enterable. I'd reccomend expanding the width a bit to make it easier to enter.

After doing that we face a problem with our 1 preset for 4 turrets setup. The exit characters have to ALL be free (i.e. none can be inside where the host vehicle will be). With our multi turret vehicle, some of them will be inside the vehicle, depending on which turret we look at. The Front turrets will have the rear exit chars inside the vehicle, the rear ones will have it the other way around. And the same goes for the left and right difference. Easiest way for us to solve this now is to
temp out turret preset once. We will use the one we already have for the front. We will use the new one for the rear. On the front one we will position all exit chars before the exit zones (not the sides, since that would cause problems again for the opposite turret etc). These characters also cannot overlap, so we have to spread them out good enough. Now, 7 exit zones are a bit much to do this for, so I will reduce them to 3.

For exit zones you need a minimum of 1. It is just, the more exits there are ( especially when the vehicle is used by more players than 1 ) the less the chance is to get stuck with another player, it is also not bad to use more than one exit for only 1 player in case the vehicle can be encased with surroundings like walls, so
that players won't accidentally get stuck with the environment ( or fall through the map ). Our additional turrets are supposed to be operated by one person. So given that we have already set them up to be enterable from one side only, 3 exits should be enough.

Open your temp preset and just delete exit zones till there are only three left. now for the remaining three make sure the character models in the transition are all in front of the exit zone. Also, depending on the height of your vehicle, try not to make the characters too low. In fact, you might be better off putting them into the air a bit depending on your vehicle model.

http://i1141.photobu...ltiturret68.png
http://i1141.photobu...ltiturret69.png
http://i1141.photobu...ltiturret70.png
http://i1141.photobu...ltiturret71.png

When done with the three exit zones click ok to close your preset and now do this for your other (new) turret preset. Reduce to three exit zones, and make the characters move to the back this time.

http://i1141.photobu...ltiturret72.png
http://i1141.photobu...ltiturret73.png
http://i1141.photobu...ltiturret74.png

As you can see, both for the front and rear one, I set my exit characters up one directly behind the exit zone and the other two are 1 on each side of that. This should fix our exiting problems. We just need to change the script on the main vehicle a bit to incorporate our 2 turret preset setup now. I called my rear turrets C&C_TurRear. Open your main vehicle's preset and go to the scripts. Leave the front spawning turrets as they are (aren't you glad you named your bones rear and front now? :3). For the rear ones, click modify on your script. Change the first parameter to say your new turret name. Click Ok.
Repeat for the other rear turret. Click OK when done. We are all set now.

http://i1141.photobu...ltiturret75.png

You can modify your settings tab for the health and armor and weapon settings ofc. I will now edit my main vehicle to shoot a light tank cannon as main weapon and the normal nod apc weapon as secondary.

http://i1141.photobu...ltiturret76.png
http://i1141.photobu...ltiturret77.png

Now I do not know if the turret and main vehicle their health and armor have to be the same for this script (as they share health), but to be safe I will update the turrets with the same health and armor. Now for the turret weapons, they should still be on the apc weapon, and they were for me, so I will leave them that way (you could also use the buggy or hummvee weapon for the gun turrets).

http://i1141.photobu...ltiturret78.png

And that should be all. Unless we still have not fixed the exit zones. But if that is the case we will just need to keep repositioning those exit characters in the exit zones. So export your map again and throw in your turret models with XCC and try it out. If you still cannot exit, move your characters further away and/or up some more (not too high though, we do not want fall damage :3)

Here is how my exit zone and character ended up (the more important here is the exit character's position):

http://i1141.photobu...ltiturret92.png

Though, tbh, I could probably place the exit character closer.

Apart from the worldbox thing and the exit character, if you are convinced they are properly set up and placed, there is one more thing which could be wrong:
Your turret spawn bones, make sure they do not intersect/collide with the vehicle mesh. Try this one last though, as in my case they do intersect and the vehicle is exitable. My problem was that they were inside the worldbox :3

----Bonus Phase: Custom Naming----

As the title of this phase says, this is a bonus and thus not required.

I bet you want to be able to name your new custom vehicle something now right? (you can do this with more than just vehicles, obviously, but I figure this is as good a place as any to tell you how to custom name stuff).

Click strings -> edit table.
Do not overwrite any existing strings. Instead use the arrow to navigate tabs all the way to the left to find the default tab. This is where we will be making our new custom strings. As you can see I already have some (the ones I used for my GDI heavy tank).

http://i1141.photobu...ltiturret79.png
http://i1141.photobu...ltiturret80.png

Double click on an empty line and a menu will pop up. For the CodeID name it something short(ish).
Then for string, name it whatever name you want it to have ingame. Leave the sound preset and the animation name empty. We will not need those for a tank/whatever name. Click OK. Now also make one for your turrets, unless you do not want them to be named differently from your main vehicle. Click Ok when done.

http://i1141.photobu...ltiturret81.png
http://i1141.photobu...ltiturret82.png
http://i1141.photobu...ltiturret83.png

Now, open up your vehicle preset and go to the settings tab. Go to TranslatedNameID. Click the small icon next to the box below it. In the pop up menu use the arrows to get to the default tab (=leftmost). Select your vehicle name and click OK. Back on the setting tab click OK again. Now repeat for the turrets, but select the turret name this time.

http://i1141.photobu...ltiturret84.png

When done, load your level, save it, and export as mix.
Open the map in XCC mixer. In windows (file) explorer navigate to your mod folder, go into the always folder,
then go into TranslationDB. You will see a file called strings.tdb
Copy paste this file somewhere else (so that you do not rename the original) and rename it to strings_map.tdb
Then drag and drop this file into your mix file in xcc. Dont forget to drag and drop in your turret models as well.

http://i1141.photobu...ltiturret85.png
http://i1141.photobu...ltiturret86.png
http://i1141.photobu...ltiturret87.png
http://i1141.photobu...ltiturret88.png
http://i1141.photobu...ltiturret89.png

Do file -> close to get out of the mix and then close XCC. Now fire up your FDS or go to multiplay LAN and test your vehicle out.

----Optional Phase: Shoot both a light tank cannon and APC bullets----

IF, you used the same setup for your vehicle weapons as me, you will notice you are only shooting light tank shells from BOTH your primary and secondary weapons. This is because the light tank cannon is a different weapon type than the APC gun. This setup is however possible, but we are going to have to make it ourselves.

In LE, go to Munitions -> weapons -> Weapons vehicles -> Weapon_lighttank_cannon_player. Temp this. Then click mod. Name it something and click OK.
Open it back up again with mod and go to the settings tab. Scroll to PrimaryAmmoDefID and SecondaryAmmoDefID. Set the first to light tank (for now) and the second the nod APC. Also change the clip size to 100 for the nod apc weapon. This makes our 2 different weapon types compatible.

http://i1141.photobu...ltiturret94.png
http://i1141.photobu...ltiturret95.png

Click OK to save your changes. Next go to Munitions -> Ammo -> ammo vehicle weapons -> ammo_lighttank_cannon_player and temp that.
Name it something and click ok. Click mod on it again and go to the settings tab. Find RateOfFire. It is at 100 right now. To see the result of this check the blooper in the video at the bottom of this post. Change the rate of fire to 1.000 for a better result.

http://i1141.photobu...ltiturret96.png
http://i1141.photobu...ltiturret97.png

Open your vehicle again and change the primary weapon to your custom named temp weapon. Leave the secondary weapon as nod apc.

http://i1141.photobu...ltiturret98.png
http://i1141.photobu...ltiturret99.png

Next, open up your temped weapon again and change the primary AmmoDefID to your custom named temped one.
http://i1141.photobu...titurret102.png

Personally, I felt the light tank cannon still shot a tad too fast so I adjusted it like on the screenie below. I also changed the SprayBulletCost to 10. The SprayBulletCost affects how many ammo 1 shot costs. At 10, 1 shot with the tank cannon takes 10 ammo. With our setup for the rest though, the nod apc weapon still costs 1 shot. Do not adjust SprayCount; this makes your shots like that of a shotgun. If for example this is put on 5, you will shoot one shell, which will,like a shotgun, split into 5 parts. This is not desirable for a tank, so leave it alone.

http://i1141.photobu...titurret100.png

----Optional: Springlength----

If you think your main vehicle is too high up on its wheels, we can adjust the SpringLength in your main vehicle's Physics Model tab. Mine was on 0.750 and I changed it to 0.500. For the difference between these values check the vid at the bottom of this post. In the blooper part this value was still on 0.750 and you can see it is a bit high up on its wheels. In the final result part of the video it is placed much better.

Note: if your vehicle was able to move before editing this setting, and it is not able to do so after changing it, than you have decreased the value by too much. Increase it again.

http://i1141.photobu...titurret101.png

----Final Result: Video----

Below is a video showing the final result, as well as a blooper. Near the end of the vid you can see I can walk into the vehicle a bit. This is caused by my having to resize the worldbox so that the turret spawn bones were not inside. The part of the chassis not part of the worldbox is thus no longer physical. It is only a small portion of my vehicle and you probably will not notice until you ram a vehicle. If you wish your entire vehicle to be physical, you should consider placing your turrets even more towards the edge, or perhaps if you model your vehicle differently, you could place them higher up so they would be above the worldbox.

http://www.youtube.com/watch?v=XzIeReXxtHM

----End of tutorial (series)----

That is the end of the third and final part of this tutorial series. I hope you were able to use these tutorials successfully :3
Soldier in the war on bots.
-------------------------------------------------------------------




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users