Jump to content
Hoppah

[Released] Limited Water Supply Logic

Recommended Posts

Surely you could rename the mission script to 'fp_freeplay' and it would hopefully work in freeplay right?

No it is two completely different ways of writing the script, 

 

Also I worked out my previous issue and believe i will have a working free play version some time later this after noon! 

 

Will post updates later but for now its time for sleep!

Link to comment
Share on other sites

@ NathanDollinger,

 

Nice try, but that's not gonna work I'm afraid. If you'd execute your command the second time, it will reset the water level back to ETL (1000). The script has to be set up to check the water levels like once per second so it can update and save the water level for each vehicle and thats not very easy to realise. One of the few ways to do that is using a hidden dummy object which keeps track of the vehicles.

 

However, I've got some good news. Got a little bit bored today and did it myself. That means:

 

You can have limited water supply in freeplay too now

 

So shit just got real.

 

Pictures first:

 

Original TLF on the default EM4 freeplay map:

wu2rk4.jpg
 
Fire Engine with supply line on the EM4 deluxe map:
206n5g1.jpg

 

As you can see the vehicles have an extra command (instead of the information panel) which shows the relative water tank level in 100, 80, 60, 40, 20 or 0% by changing the icons. In game, you can click the command and it will inform you of the actual water levels in gallon and the exact relative amount (as shown in the screenshots too). To make the logic as useful as possible for everyone, I decided to use the vehicleclasses (TLF, LPF and GTF) as references for the maximum water tank amounts. That means it should work with ALL vehicles that are either a TLF, LPF or GTF type and that's it. Other than that, the limited water supply works the exact same as in the demo mission, although the logic is implemented differently. I still need to give the freeplay logic a few extra tests and will release the entire functionality tonight or tomorrow.

 

Hoppah

Link to comment
Share on other sites

Oh great and powerful Hoppah we thank your for your work. Would it be possible to make trucks connect to each other so something like a tanker could be made practical. Since I''m not sure of your familiarity with US fire engines it might work like this. A truck with a 500 gallon tank attacks a fire and soon the tank drops to 200. A tanker arrives and is connected to the first truck, the tanker has a 2000 gallon tank. The water level in the tanker now starts to drop while the water level in the first truck stays steady (since the water is now coming from the tanker). Once the tanker is out of water the water level in the first truck starts to drop again. In theory could this be done? I can think of at least one mod that would benefit greatly from a functional tanker script.

Link to comment
Share on other sites

@ NathanDollinger,

 

Nice try, but that's not gonna work I'm afraid. If you'd execute your command the second time, it will reset the water level back to ETL (1000). The script has to be set up to check the water levels like once per second so it can update and save the water level for each vehicle and thats not very easy to realise. One of the few ways to do that is using a hidden dummy object which keeps track of the vehicles.

 

However, I've got some good news. Got a little bit bored today and did it myself. That means:

 

You can have limited water supply in freeplay too now

 

So shit just got real.

 

Pictures first:

 

Original TLF on the default EM4 freeplay map:

 
 
Fire Engine with supply line on the EM4 deluxe map:
 

 

As you can see the vehicles have an extra command (instead of the information panel) which shows the relative water tank level in 100, 80, 60, 40, 20 or 0% by changing the icons. In game, you can click the command and it will inform you of the actual water levels in gallon and the exact relative amount (as shown in the screenshots too). To make the logic as useful as possible for everyone, I decided to use the vehicleclasses (TLF, LPF and GTF) as references for the maximum water tank amounts. That means it should work with ALL vehicles that are either a TLF, LPF or GTF type and that's it. Other than that, the limited water supply works the exact same as in the demo mission, although the logic is implemented differently. I still need to give the freeplay logic a few extra tests and will release the entire functionality tonight or tomorrow.

 

Hoppah

 

 

.... Grr lol 

 

Good job Hoppah! 

Hope to see it soon!

Link to comment
Share on other sites

@ NathanDollinger,

 

Nice try, but that's not gonna work I'm afraid. If you'd execute your command the second time, it will reset the water level back to ETL (1000). The script has to be set up to check the water levels like once per second so it can update and save the water level for each vehicle and thats not very easy to realise. One of the few ways to do that is using a hidden dummy object which keeps track of the vehicles.

 

However, I've got some good news. Got a little bit bored today and did it myself. That means:

 

You can have limited water supply in freeplay too now

 

So shit just got real.

 

Pictures first:

 

As you can see the vehicles have an extra command (instead of the information panel) which shows the relative water tank level in 100, 80, 60, 40, 20 or 0% by changing the icons. In game, you can click the command and it will inform you of the actual water levels in gallon and the exact relative amount (as shown in the screenshots too). To make the logic as useful as possible for everyone, I decided to use the vehicleclasses (TLF, LPF and GTF) as references for the maximum water tank amounts. That means it should work with ALL vehicles that are either a TLF, LPF or GTF type and that's it. Other than that, the limited water supply works the exact same as in the demo mission, although the logic is implemented differently. I still need to give the freeplay logic a few extra tests and will release the entire functionality tonight or tomorrow.

 

Hoppah

 

By the power of greyskull...

tumblr_m9jmrvGatD1qlvd4eo1_250.gif

Link to comment
Share on other sites

:OOOOO. Hoppah you're epic  :D

 

Question: So in the freeplay all vehicles that are TLF, LPF or GTF can have limited water supply? 

 

 

Yes, the script runs in the background and automatically recognizes those vehicle types and assignes the limited water supply logic to them. I'm currently making it compatible with DLK types too, because I forget about the basket's water cannon.

 

 

Hai,

 

Looks great!!! But unfortunately for you this script was once made by a german modder for freeplay too...

But this one is less buggy i hope!

Can't wait to use it!

 

Why would it be 'unfortunately'? I'm not claiming I'm the first one to do this and I can't really care about it either. Hell, the first post even mentions something about other mod-creators doing a similar logic. I wrote my own scripts so I could alter it to my own wishes (for the US Army Mod and NYC Mod) and so I could release a version to the public without having to deal with possible copyright claims. As far as I know, my script isn't buggy at all and works flawlessly. The only possible issue might be a performance issue when you're dispatching like 20 fire engine's, but I haven't tested that yet.

 

 

Oh great and powerful Hoppah we thank your for your work. Would it be possible to make trucks connect to each other so something like a tanker could be made practical. Since I''m not sure of your familiarity with US fire engines it might work like this. A truck with a 500 gallon tank attacks a fire and soon the tank drops to 200. A tanker arrives and is connected to the first truck, the tanker has a 2000 gallon tank. The water level in the tanker now starts to drop while the water level in the first truck stays steady (since the water is now coming from the tanker). Once the tanker is out of water the water level in the first truck starts to drop again. In theory could this be done? I can think of at least one mod that would benefit greatly from a functional tanker script.

 

I do think it's possible, but it's not on my to-do list yet. I don't have a tanker model either, but I guess you could hook up a hose to the tanker first and then to the fire engine's supply line connector to get it work.

 

Hoppah

Link to comment
Share on other sites

Glad to hear it's possible! In the future if/when such a script is made it should really help a couple of small town mods and will add more realism to all mods and connecting fire trucks is common practice when their are no hydrants available.

Link to comment
Share on other sites

Hows the testing coming hoppah? 

Hope we see this today!

 

Can't wait to start working with it! 

 

It will with out a doubt go down as one of the best modding scripts in EM4 History!

 

Had to fix a couple of bugs and was having troubles with the DLK (The ladder) and the water cannon on its basket, but it seems to work fine.

Link to comment
Share on other sites

Another version of that would be an engine connecting to a ladder truck or another engine (sometimes the first arriving engine goes right in and starts fighting the fire, while the second due engine sets up a supply line for the first due engine to use. More common in urban areas where response times are much less.)

Another idea I just had is to turn the pump on/off, whereas when it's on the truck won't move and it checks the water levels, and the rest of the stuff works, and when turned off it saves that number of the tank level and stops checking until turned on. Would help with any potential lag and be more realistic

Link to comment
Share on other sites

@ Axxif, I like the idea to be able to turn off the pump. Thanks

 

 

 

I've released v1.1 of the demo mod which includes the entire functionality for freeplay too. Check out the first post for more information. I will write instructions how to implement the freeplay functionality into other mods tomorrow.

 

Hoppah

Link to comment
Share on other sites

Along with the pump idea could you make it so one firefighter was required to be still in the vehicle for the pump to operate? Like in the US Army mod where a unused Firefighter was required to operate the water cannon... I know all the department's I have had experience with require 1 firefighter to be running the pump at all times. So if the truck has 6 firefighters 1 sets up the filler line (nearest truck or hydrant), 4 get hoses and attach them. Then on a command (button on menu) the remaining firefighter inside the truck appears outside by the control panel and then the hoses will work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...