Ga naar inhoud


Foto

[Released] Limited Water Supply Logic


  • Please log in to reply
253 replies to this topic

#181 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3879 Posts:
  • Gender:Male
  • Location:Special Needs Department

Gepost 05 september 2013 - 11:29

Now the question remains....How hard will it be to place in a mod

Yes i understand you said "please be aware that any vehicle in your mod will probably not be fully compatible with v1.2 anymore"

 

About as hard as the older version, you just gotta do a few extra things. I will update the implementation guide this weekend.

 

 

Sounds great. Haven't found any real obstacles with scripts just yet; haven't got to the big scripts just yet, other than rapid deployment, though.

I'm beginning to think that simply releasing my edited scripts will be easier than going step by step with all my edits.

Quick Q Hoppah? Will it be a simple copy paste for the equipment actions on deployment if I want to apply it to GTF vehicles, or will some change to the function be needed?

 

If you want neither the 'activate pump' functionality or the water tanker functionality, you may want to stick with scripts from v1.1 if they already work fine in your mod.

I'm not sure with you mean with the question. You want a second deploy command for the GTF so the fire fighters get a variety of equipment, like the code for the DLK vehicles?

 

 

 

Hello Hoppah
How to apply for more than one tank in the mod?
Example 2 tank trucks!

 

 

The scripts are set up for 1 tanker prototype. If you have two different tanker models in your modification you need to change all the scripts. As long the prototype is the same, you should be able to buy more than 1 tanker in freeplay though.



#182 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Posts:
  • Gender:Male

Gepost 05 september 2013 - 12:32

If you want neither the 'activate pump' functionality or the water tanker functionality, you may want to stick with scripts from v1.1 if they already work fine in your mod.

I'm not sure with you mean with the question. You want a second deploy command for the GTF so the fire fighters get a variety of equipment, like the code for the DLK vehicles?

 

I've got the pumps function up and running fine in my mod (though the command does not show up on the vehicle menu), and I haven't run into any bugs I can't fix. Haven't tried out the tanker in game yet, but I'm assuming everything will be fine with it, too.

 

Yeah, though I realize now that with one person on the pump, four on the hoses, and one for the gun, I'm pretty much out of people I can use for any vehicle I have. Mostly I was wondering for the brush truck, but now I realize that the extra person now runs the pump, so the idea is moot. The only idea I have is maybe add pumps to the ladder vehicles (if that makes sense).

 

Sadly, my fears about the wye and hose extension were realized. Neither one will pick up, and I made sure to use the model files, prototype files, and scripts straight from the demo mod; I do not get what's causing it. Is there some other script in the LA mod that might be a culprit? Or am I just out of luck for no conceivable reason? Your demo mod works flawlessly with them.

 

Now, the odd thing is that when I spawn a vehicle with the script or menu after starting freeplay, it shows the pump command on the vehicle, but it does not have the water supply command just like before. Also, while it will connect a supply line during deployment, it won't disconnect it, not even outside of deployment.



#183 eyespy900

eyespy900

    Senior Captain

  • Members
  • 251 Posts:
  • Gender:Male

Gepost 05 september 2013 - 10:40

or if anyone else knows how to add the door action in to the attach hose script ?


Spoiler


hoppah or any one help me please

#184 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3879 Posts:
  • Gender:Male
  • Location:Special Needs Department

Gepost 06 september 2013 - 12:56

or if anyone else knows how to add the door action in to the attach hose script ?


Spoiler


hoppah or any one help me please

 

Some patience my friend. Try out this script

 

Spoiler

 

 

 

Sadly, my fears about the wye and hose extension were realized. Neither one will pick up, and I made sure to use the model files, prototype files, and scripts straight from the demo mod; I do not get what's causing it. Is there some other script in the LA mod that might be a culprit? Or am I just out of luck for no conceivable reason? Your demo mod works flawlessly with them.

 

The Wye script in the Limited Water Supply Mod can be found in a file called HoseExtensions.script, while the LA Mod version can be found in the file LAWye.script. I'm guessing LAWye.script is the culprit, so make sure to delete that one to prevent double commands.

 

 

Now, the odd thing is that when I spawn a vehicle with the script or menu after starting freeplay, it shows the pump command on the vehicle, but it does not have the water supply command just like before.

 

Apparently, the background script to check vehicles doesn't work. Double check the freeplayscripts and make sure there is an object on the map with the name 'water_supply_main'. Also check the logfile after giving it another shot and look for the following line: 

!WATER, Start DummyCheckWaterSupply

If that line is not present, the game was not able to initialize the freeplay script in the background.

 

 

Also, while it will connect a supply line during deployment, it won't disconnect it, not even outside of deployment.

 

You can't even disconnect the supply line with an unequipped fire fighter and clicking on the vehicle (should show a different icon)? There may be something wrong with the removefirehose.script and/or attachfirehose.script files. I don't know how much you changed for personal use, but I'm guessing something is screwed in there.

 

 

If you still run into problems, can you rar your scripts and post them here? I may be able to help you faster if I can take a quick look to your files.


#185 eyespy900

eyespy900

    Senior Captain

  • Members
  • 251 Posts:
  • Gender:Male

Gepost 06 september 2013 - 02:59

thanks got the reply mate, unfortunatly this did not work.  i will zip the scripts up and send them here

 

pete



#186 eyespy900

eyespy900

    Senior Captain

  • Members
  • 251 Posts:
  • Gender:Male

Gepost 06 september 2013 - 03:03

here are all the scripts i have. 



#187 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Posts:
  • Gender:Male

Gepost 07 september 2013 - 09:08

The Wye script in the Limited Water Supply Mod can be found in a file called HoseExtensions.script, while the LA Mod version can be found in the file LAWye.script. I'm guessing LAWye.script is the culprit, so make sure to delete that one to prevent double commands.

When you released the first demo mod I took out the old LAWye file; only one I use now is the script within HoseExtensions, as far as I know. The wye has always had this problem in the mod (4X4 YSB LA SubMod), and I had hoped that using your new scripts, models, and prototypes would fix it. For some reason, it hasn't.
 

Apparently, the background script to check vehicles doesn't work. Double check the freeplayscripts and make sure there is an object on the map with the name 'water_supply_main'. Also check the logfile after giving it another shot and look for the following line: 

!WATER, Start DummyCheckWaterSupply

If that line is not present, the game was not able to initialize the freeplay script in the background.

 

The script works well enough for all the vehicles spawned on the map at start.

!WATER, Start DummyCheckWaterSupply
!WATER, Assigned water tank level of 400 to mod:Prototypes/Vehicles/02 LA Fire Department/brush_truck.e4p
!WATER, Assigned water tank level of 800 to mod:Prototypes/Vehicles/02 LA Fire Department/aerial_ladder.e4p
!WATER, Assigned water tank level of 1200 to mod:Prototypes/Vehicles/02 LA Fire Department/fire_engine1.e4p
!WATER, Assigned water tank level of 1200 to mod:Prototypes/Vehicles/02 LA Fire Department/fire_engine2.e4p
!WATER, Assigned water tank level of 1200 to mod:Prototypes/Vehicles/02 LA Fire Department/fire_engine1_1.e4p
!WATER, Assigned water tank level of 1200 to mod:Prototypes/Vehicles/02 LA Fire Department/fire_engine2_1.e4p
!WATER, Assigned water tank level of 2400 to mod:Prototypes/Vehicles/02 LA Fire Department/water_tender.e4p

However, when vehicles are spawned by script, I see this.

!WATER, Removed Water Supply Tank of: (null)

I get nothing when I spawn from the game menu. Vehicles from either method don't have the water level icons (unlike the vehicles spawned at start), and have the pump switch icon (also unlike those spawned at start, though all my vehicles have the pump command).

 

You can't even disconnect the supply line with an unequipped fire fighter and clicking on the vehicle (should show a different icon)? There may be something wrong with the removefirehose.script and/or attachfirehose.script files. I don't know how much you changed for personal use, but I'm guessing something is screwed in there.

 

If you still run into problems, can you rar your scripts and post them here? I may be able to help you faster if I can take a quick look to your files.
Somehow there was a fluke with the supply line. I tried again on multiple vehicles with no problem.
 
I'll upload my command folder, and the freeplay script below.
Bijgevoegd bestand  fp_freeplay.rar   0bytes   46 Aantal downloads
Bijgevoegd bestand  Command.rar   0bytes   47 Aantal downloads
 
(Related: Should I not use "!StrCompare(v.GetPrototypeFileName(), CONSTANT) == 0"? I've seen it as "StrCompare(v.GetPrototypeFileName(), CONSTANT) !== 0" in your scripts, I believe.)


#188 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3879 Posts:
  • Gender:Male
  • Location:Special Needs Department

Gepost 11 september 2013 - 05:43

It took a while, but I have finished the updated Mod Implementation Guide. You can find the pdf document as an attachment in the first post: http://forum.emergen...logic/?p=258435

 

The guide is in essential the same as the previous one, but also provides information about the water tanker and the 'pump activation' functionality.

 

Let me know, if there's anything unclear in the guide.



#189 sgtmatt325

sgtmatt325

    Captain

  • Members
  • 212 Posts:
  • Gender:Male
  • Location:Scranton PA
  • Interests:Firefighting
    Emergency 4
    Ford Trucks
    Sutphen Tower Ladders

Gepost 12 september 2013 - 04:00

Hoppah you forgot to tell people they need to edit the following files

 

Lang > en > infotext.xml & portraits.xml

 

Specs > freeplaybase.xml, freeplaybase_mp.xml & portraits.xml

 

Units > Vehicles > Fire Department > 120Watertanker

 

Also only problem i'm having is that the Tanker can't supply a Engine and a firefighter can spray with the hose


Lower Valley Mod Creator


#190 CFDDIVE11

CFDDIVE11

    Captain

  • Members
  • 171 Posts:
  • Gender:Male

Gepost 12 september 2013 - 06:43

Only problem for me is I can't figure how to get it working (yes I have used the tutorial that was made)

Signature Removed due to size


#191 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3879 Posts:
  • Gender:Male
  • Location:Special Needs Department

Gepost 12 september 2013 - 09:55

However, when vehicles are spawned by script, I see this.

I get nothing when I spawn from the game menu. Vehicles from either method don't have the water level icons (unlike the vehicles spawned at start), and have the pump switch icon (also unlike those spawned at start, though all my vehicles have the pump command).

 

 

The pump switch command is already assigned to each vehicle by the editor, so that has nothing to do with this. The logic only adds the water level icon/command. The water logic scripts in your rar file look good to me, although it's hard to find errors. For some reason the game thinks the spawned vehicles are either not valid, smoking or are destroyed. That's when the game deletes the dummy object and the logfile creates the "!WATER, Removed Water Supply Tank of: (null)" line. I'm guessing it thinks the vehicles are not valid for some reason. The only cause I can think of for now is that other scripts are interfering with the water logic functionality. :(

 

Also, the custom desk gun command in your rar file is still called 'VcmdWaterSwitch' (should be VcmdCannonSwitch) which does not work with v1.2 of the script, because it is set up to recognize 'VcmdCannonSwitch'. You should rename the command in Waterswitch.script and reassign that command to all vehicles with a custom water cannon. Try to fix this first and see if at least the parked vehicles fully work.

 

 

(Related: Should I not use "!StrCompare(v.GetPrototypeFileName(), CONSTANT) == 0"? I've seen it as "StrCompare(v.GetPrototypeFileName(), CONSTANT) !== 0" in your scripts, I believe.)

 

Both are wrong, you should use the second one with only one equals sign instead of two:

StrCompare(v.GetPrototypeFileName(), CONSTANT) != 0

You should read this as: if v is NOT equal to CONSTANT then... So it's the opposite of using two equals signs.

I suggest you fix this as well and hopefully we can find a fix for the spawning vehicles problem then.

 

 

 

Hoppah you forgot to tell people they need to edit the following files

 

Lang > en > infotext.xml & portraits.xml

 

Specs > freeplaybase.xml, freeplaybase_mp.xml & portraits.xml

 

Units > Vehicles > Fire Department > 120Watertanker

 

Also only problem i'm having is that the Tanker can't supply a Engine and a firefighter can spray with the hose

 

No, I didn't forget about that. The guide is about the limited water functionality, not about how steal the water tanker from the mod or how to add new vehicles to mod and which files you have to change to add a new vehicle. Adding that would make the guide way too complex. I added the vital information only, which are the traits the water tanker needs to have (GTF vehicletype, 1 hose connection, 1 supply line connection) to get it to work with my logic. Other than that, it doesn't matter what the water tanker in your mod looks like. Also, the water tanker is not my model. If you want to take it from the demo modification, you may need permission from Freakinmusket anyway. Just like the two FDNY fire engines are MikeyPI's models.



#192 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Posts:
  • Gender:Male

Gepost 12 september 2013 - 11:00

Also, the custom desk gun command in your rar file is still called 'VcmdWaterSwitch' (should be VcmdCannonSwitch) which does not work with v1.2 of the script, because it is set up to recognize 'VcmdCannonSwitch'. You should rename the command in Waterswitch.script and reassign that command to all vehicles with a custom water cannon. Try to fix this first and see if at least the parked vehicles fully work.
Well, I went through and made sure I reverted the names in your new scripts (I felt too lazy to go back and change the commands on all the vehicles), and haven't run into any problems. I can go back and change it.

Both are wrong, you should use the second one with only one equals sign instead of two:

StrCompare(v.GetPrototypeFileName(), CONSTANT) != 0

You should read this as: if v is NOT equal to CONSTANT then... So it's the opposite of using two equals signs.

I suggest you fix this as well and hopefully we can find a fix for the spawning vehicles problem then.

Alright, I'll go through my scripts and change those.



#193 sgtmatt325

sgtmatt325

    Captain

  • Members
  • 212 Posts:
  • Gender:Male
  • Location:Scranton PA
  • Interests:Firefighting
    Emergency 4
    Ford Trucks
    Sutphen Tower Ladders

Gepost 13 september 2013 - 09:09

Seems like a messed something up cause the Tanker can't supply a Engine and then the hose lines off the Engine can't spray but the line off the Tanker does

(Yes i understand about the permission thing but i'm just testing)


Lower Valley Mod Creator


#194 mariuswww

mariuswww

    Senior Captain

  • Members
  • 325 Posts:
  • Gender:Male

Gepost 20 september 2013 - 06:58

Hey I got the scripts set up (followed Hereweard's tutorial) I got everything working, the only problem is that when a firefighter attaches a hose, he loses the "cool"/"exstinguish" command after about 0.5 seconds. Any ideas where the problem might be?



#195 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Posts:
  • Gender:Male

Gepost 21 september 2013 - 12:10

My tutorial is out of date now. The newest version has pump commands; if the pumps aren't activated, no hoses will work. Add a pump_controller child on the vehicle, just like the controller one. Then add the pcmd and vcmd to people and vehicles. Then you can use a person to control the pumps.

#196 mariuswww

mariuswww

    Senior Captain

  • Members
  • 325 Posts:
  • Gender:Male

Gepost 21 september 2013 - 06:00

My tutorial is out of date now. The newest version has pump commands; if the pumps aren't activated, no hoses will work. Add a pump_controller child on the vehicle, just like the controller one. Then add the pcmd and vcmd to people and vehicles. Then you can use a person to control the pumps.

I've got the pump stuff going also. One guy controlling the pump still does not help with the cool command..



#197 Miercolini

Miercolini

    Captain

  • Members
  • 180 Posts:
  • Gender:Male
  • Location:NYC

Gepost 14 november 2013 - 02:55

Has anyone successfully got the newest version working in a mod? 


Geposte afbeelding


#198 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Posts:
  • Gender:Male

Gepost 14 november 2013 - 10:31

Kind of, in a heavily modded version of the 4x4 YSB LA submod.  It has issues, and I've been stuck on how to find out what's the root cause or how to fix it.

 

For some reason, vehicles that do not start on the map aren't recognized as valid and don't get water tanks, plus I cannot get the wye or hose extenders to be picked up (they install and work just fine). Other than those, the mod does work, so it's not a complete bust.



#199 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3879 Posts:
  • Gender:Male
  • Location:Special Needs Department

Gepost 15 november 2013 - 09:56

Kind of, in a heavily modded version of the 4x4 YSB LA submod.  It has issues, and I've been stuck on how to find out what's the root cause or how to fix it.

 

For some reason, vehicles that do not start on the map aren't recognized as valid and don't get water tanks, plus I cannot get the wye or hose extenders to be picked up (they install and work just fine). Other than those, the mod does work, so it's not a complete bust.

 

Shouldn't be that hard to fix, although without the files it's hard to tell. If you can find a way to send me the entire submod I may take a quick look at it and see if I can find the cause of the problems.



#200 The Loot

The Loot

    Battalion Chief

  • Members
  • 725 Posts:
  • Gender:Male

Gepost 16 november 2013 - 01:03

I'll look into that. I can probably just put it up on Dropbox or something and PM you the link.

 

Edit: Alright, great work, hoppah! You smashed those bugs nicely.

 

A quick suggestion regarding undeploy; could you make it so that the person running the pumps is the one that disconnects the supply line? It would save some time over one of the other connected people removing both their line and the supply line.