Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFacility vehicles 001 - Road roller #9164
Conversation
Aenye
added some commits
Sep 21, 2014
Aenye
changed the title
Facility vehicles 001 - Road roller
Facility vehicles 001 - Road roller [WIP]
Sep 21, 2014
Aenye
added some commits
Sep 21, 2014
Aenye
changed the title
Facility vehicles 001 - Road roller [WIP]
Facility vehicles 001 - Road roller
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
Looks proper. Couldn't find any code to set the type/amount of damage on collision with vehicle part, so I gave the roller drum a lot of health and mass. |
Aenye
added some commits
Sep 21, 2014
KA101
reviewed
Sep 21, 2014
| "item" : "hd_steel_drum", | ||
| "difficulty" : 7, | ||
| "location" : "center", | ||
| "flags" : ["OBSTACLE"], |
This comment has been minimized.
This comment has been minimized.
KA101
Sep 21, 2014
Contributor
These should probably have the WHEEL flag, since they're intended to flatten all in their path. ;-)
Aenye
added some commits
Sep 21, 2014
This comment has been minimized.
This comment has been minimized.
|
Gave them the wheel quality and removed the wide wheels in the vehicle blueprint. Looks more "trucky" now. |
This comment has been minimized.
This comment has been minimized.
|
Looking at this one now. It's entirely possible to add the steamroller to the public works, just needs some tinkering in mapgen.cpp around line 5853. You up for it? |
KA101
self-assigned this
Sep 22, 2014
This comment has been minimized.
This comment has been minimized.
|
Initial trial: the roller drums are missing the drive-function of tires. Needed to add one before it would go anywhere. Not familiar with vehicle coding so not yet sure what to fix. The roller FLIES once it has wheels. 119 MPH was quite feasible. Unfortunately the drums aren't quite armored enough to flatten a car that I hit at 69MPH. Ended up going through the drums and getting the windshield torn up. Will try a horde and a house shortly. Hordes: SPLAT. Would recommend aftermarket frame-replacement if you plan on making this a combat vehicle, though. (Leave it as standard frames. It's not intended to pave people.) Forest: Don't try to use the Roller to make a road. Loses v. trees, but then so can tanks. Houses: Breach and back up. The collapse won't do your ride any good. |
This comment has been minimized.
This comment has been minimized.
|
Found the problem. Rollers need a width and a bigness value. vehicle.cpp, wheels_area. OK. Needs to have an entry in var_vehicle_parts.json so it can have a bigness value, and then needs a wheel_width in the vehicle_parts.json. With those in place, the rollers can serve as the most durable wheels you'll ever have. FWIW: http://www.cat.com/en_US/products/new/equipment/compactors/tandem-vibratory-rollers/18350130.html |
KA101
removed their assignment
Sep 22, 2014
This comment has been minimized.
This comment has been minimized.
|
Thanks - will be working on it today and tomorrow (work again). I'll try doing the public works as well. ( There's a "damage_modifier" parameter that can be set (typically 50 or 60) - if I understand correctly, setting it at, say 20, should significantly reduce the dmg taken by drums, right ? ) I'll get on setting the numbers and testing ASAP. Thanks for the mouthwatering links - I want to have my survivor drive such a monster ^^ |
Aenye
changed the title
Facility vehicles 001 - Road roller
Facility vehicles 001 - Road roller [WIP]
Sep 22, 2014
Aenye
added some commits
Sep 22, 2014
This comment has been minimized.
This comment has been minimized.
|
Checked vehicle.cpp - wheels_area doesn't need any modifications, after I added the bigness and width, does it ? |
This comment has been minimized.
This comment has been minimized.
|
Added some random number checking to mapgen.cpp for whether the vehicle atp ublic works will be a flatbed or a roller. Everything should work fine now - will be testing tomorrow (sorry for being so sluggish !). |
KA101
reviewed
Sep 22, 2014
| "price": 50000, | ||
| "material": ["steel"], | ||
| "weight": 22600, | ||
| "weight": 185000, |
This comment has been minimized.
This comment has been minimized.
KA101
Sep 22, 2014
Contributor
Yikes! two weight lines. (One of the reasons I posted those links: the drum on the smaller roller weighed a little over 800000 grams per segment--five drums/segments to front/back of the Roller. Top speed was 7.5 MPH. The road roller should be a heavy monster.)
KA101
reviewed
Sep 22, 2014
| "item" : "hd_steel_drum", | ||
| "difficulty" : 7, | ||
| "location" : "center", | ||
| "flags" : ["OBSTACLE", "WHEEL"], |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Sep 22, 2014
| "symbol": "m", | ||
| "color": "light_gray", | ||
| "name": "large steel drum", | ||
| "description": "A large cylinder fashioned out from thick plates of hardened steel, that is normally found on road rollers. Numerous massive spokes, attached to a central axis, reinforce its structure even further, making it an unstoppable force once it starts rolling.", |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Looking forward to it. Haven't seen the damage_modifier, so not sure. Sorry. wheels_area takes those values and 8-) rolls with them, so yeah, should be good to go there. Public works looks good. |
Aenye
added some commits
Sep 23, 2014
This comment has been minimized.
This comment has been minimized.
|
Testing out the damage modifier and the numbers that are in ATM - let's see how this ...rolls out. |
This comment has been minimized.
This comment has been minimized.
|
Works nicely now - still not massive or resilient enough, but it takes an entire truck to destroy a single row of drums... Also, "damage_modifier" seems to modify the maount of damage taken by anything a part hits , hence it is upped for blades and spikes (250 / 300 respectively) and lowered for doors and windshields (50/80 respetively). Setting it at 500 should reflect what happens to things when they get rolled over by something like this. |
Aenye
added some commits
Sep 23, 2014
This comment has been minimized.
This comment has been minimized.
|
Updates helped - "safe speed" with 10 roller segments is around 70 km/h (top speed at almost a thousand is ...odd). Hitting cars deals a lot of damage, but standard ones typically don't break the drums anymore. Tried plowing through a forest - went about a house's length into it before the last of the drums gave out. IMHO is ok now. |
Aenye
changed the title
Facility vehicles 001 - Road roller [WIP]
Facility vehicles 001 - Road roller
Sep 23, 2014
This comment has been minimized.
This comment has been minimized.
|
Maybe change v12 to something cheaper and less powerful? |
This comment has been minimized.
This comment has been minimized.
|
You're right - set it to v8. On the other hand, though, a roller should have an immense (and gas guzzling) engine - even that would allow it only a little speed. While I could set the drum size/width to have this, the values for that seem to be unrealistically high... I would say that the wheel_area system needs to be tuned, but I'm not yet sufficiently adept at coding stuff (as everyone can see). Ok, it needs an update: w=60, m=750 kg -> sp 95/1239 w=20, m=750 kg -> sp 197/1239 The mass of the wheels/whole car seems to be under-represented in the current system. Is there any reason for that (i.e. making mass a bigger factor would break something) or can I think about meddling with it ? |
This comment has been minimized.
This comment has been minimized.
|
I think max speed is only determined by engine? |
This comment has been minimized.
This comment has been minimized.
|
Ah, I see it. Also found- int max_velocity (bool fueled = true); -in vehicle.h. If the max speed is dependent only on the type/amount of engines, it pretty much tells you "if you suspended the engine on a float, this is how fast it could go". IMHO this looks redundant and could be scrapped in favour of the k/mass dynamics parameters we can already see. That or there's some other factor I'm unaware of (if so, sorry). |
KA101
self-assigned this
Sep 23, 2014
This comment has been minimized.
This comment has been minimized.
|
Last one to seriously grapple with vehicle code was @ianestrachan, IIRC. Pretty confident @i2amroy did something in vehicles more recently, but I'm not sure how thorough it was. Hopefully they'll be better informed about this, though changing the system should wait until after 0.B hits. For now, Rapid Roller will probably be OK. |
This comment has been minimized.
This comment has been minimized.
|
Thanks ! I'll work out the formulas and if we can scrap max/safe speed in favour of accleration, we should be able ot make the roller into a slow-but-nigh-unstoppable fortress... If we get inertia as well, this could make for a nice solution to collisions and the "tree problem". Might also find some use for other stuff... |
KA101
reviewed
Sep 23, 2014
| @@ -5854,21 +5854,45 @@ __________ f \n", | |||
| if (t_west == "public_works" && t_north == "public_works") { | |||
| rotate(1); | |||
| if (x_in_y(2, 3)) { | |||
| add_vehicle ("flatbed_truck", 2, 0, 90); | |||
| roller_check=rng(0,100) | |||
This comment has been minimized.
This comment has been minimized.
KA101
Sep 23, 2014
Contributor
Detail I missed: these roller-check rolls need semicolons afterward. I'm fixing 'em in the merge.
This comment has been minimized.
This comment has been minimized.
|
Whoops, sorry and thanks for correcting ! :D |
Aenye commentedSep 21, 2014
Adds the first road construction vehicle on my list - road roller. Based on a flatbed truck (tried to emulate the single-man cabin to some extent), it features a row of heavy duty drums at the front and at the back. These can be deconstructed only, yielding some steel plating and debris.
Wanted to make it spawn in the public works (can it be done ?), but it seems that the building is non-mapgen.