cops Posted September 4, 2013 Report Share Posted September 4, 2013 this looks so cool! Thank you Hoppah Quote Link to comment Share on other sites More sharing options...
sgtmatt325 Posted September 4, 2013 Report Share Posted September 4, 2013 Now the question remains....How hard will it be to place in a modYes i understand you said "please be aware that any vehicle in your mod will probably not be fully compatible with v1.2 anymore" Quote Link to comment Share on other sites More sharing options...
Brandon Murphy Posted September 4, 2013 Report Share Posted September 4, 2013 Yes, that would be nice to know, if possible. Quote Link to comment Share on other sites More sharing options...
The Loot Posted September 4, 2013 Report Share Posted September 4, 2013 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? Quote Link to comment Share on other sites More sharing options...
paulo ve Posted September 5, 2013 Report Share Posted September 5, 2013 Hello HoppahHow to apply for more than one tank in the mod?Example 2 tank trucks! Quote Link to comment Share on other sites More sharing options...
Hoppah Posted September 5, 2013 Author Report Share Posted September 5, 2013 Now the question remains....How hard will it be to place in a modYes 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 HoppahHow 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. Quote Link to comment Share on other sites More sharing options...
The Loot Posted September 5, 2013 Report Share Posted September 5, 2013 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. Quote Link to comment Share on other sites More sharing options...
eyespy900 Posted September 5, 2013 Report Share Posted September 5, 2013 or if anyone else knows how to add the door action in to the attach hose script ? hi hoppahi have a attach fire hose script that opens the rear doors of my fire engine when you connect a hose. at the end of the script there are the open door parts. where should i put this in the limited water supply script?object AttachFireHose : CommandScript{ AttachFireHose() { SetValidTargets(ACTOR_OBJECT | ACTOR_VEHICLE); SetGroupID(CGROUP_FIREHOSE); SetGroupLeader(true); SetPossibleCallers(ACTOR_PERSON); SetPossibleEquipment(EQUIP_FIREHOSE); SetPossibleExists(CPE_FREE_HOSE_CONNECTION); SetNeedsConnectedHose(CFN_FAIL); SetRestrictions2(RESTRICT2_ISHYDRANT); SetPriority(220); } /*bool CheckPossible(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON) return false; return Caller->GetFirehoseID() == 0 && Caller->GetEquipment()==EQUIP_FIREHOSE && Game::ExistsFreeHoseConnection(); }*/ bool CheckGroupVisibility(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON) return false; return Caller->GetFirehoseID() == 0; } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if(!Caller->IsValid() || !Target->IsValid() || (Caller->GetID()==Target->GetID())) return false; if(Caller->GetFirehoseID()) return false; if(Caller->GetType()!=ACTOR_PERSON) return false; Person c(Caller); if (c.GetEnteredCarID() != -1) return false; if(Caller->GetEquipment()==EQUIP_FIREHOSE) { if(Target->GetType() == ACTOR_OBJECT) { GameObject obj(Target); if(obj.IsHydrant() && !obj.IsHydrantInUse()) return true; return false; } else if(Target->GetType() == ACTOR_VEHICLE) { Vehicle v(Target); if(v.GetVehicleType() == VT_FIREFIGHTERS_GTF && v.GetEnergy() > 0.1f * v.GetMaxEnergy() && v.IsConnectorFree()) return true; return false; } } return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Caller->PushActionMove(ACTION_NEWLIST, Target, TARGET_FREE_CONNECTOR); if (Target->GetType() == ACTOR_VEHICLE) Caller->PushActionCheckFreeConnector(ACTION_APPEND, Target); Caller->PushActionUseEquipment(ACTION_APPEND, Target, childID, 1.0f); if (Target->GetType() == ACTOR_VEHICLE) { Vehicle v(Target); if (v.HasCommand("Cidea")) { v.EnableBlinker(BLT_BOTH); Game::ExecuteCommand("DUMMYOpenDoor1", &v, &v); Game::ExecuteCommand("DUMMYOpenDoor2", &v, &v); } } }}; hoppah or any one help me please Quote Link to comment Share on other sites More sharing options...
Hoppah Posted September 6, 2013 Author Report Share Posted September 6, 2013 or if anyone else knows how to add the door action in to the attach hose script ?hoppah or any one help me please Some patience my friend. Try out this script //******************************************************************************************// Attach fire hose script for the New York City mod by MikeyPI and Hoppah// Usage of this script in other mods is NOT allowed without permission of Hoppah//******************************************************************************************const char PROTO_WATER_TANKER[] = "mod:Prototypes/Vehicles/02 Fire Department/water_tanker.e4p";const char PROTO_LOCAL_FD[] = "mod:Prototypes/Vehicles/02 Local Emergency Services/fire_truck.e4p";const char OBJ_LOCAL_FD_CONN[] = "mod:Prototypes/Vehicles/04 Objects/fire_truck_connectors.e4p";const char NAME_CONNECTORS[] = "PumpConnector";const char HINT_NOTVALID[] = "This vehicle doesn't support hose connections!";const char CHILD_WATER_SUPPLY[] = "water_supply";object AttachFireHose : CommandScript{ AttachFireHose() { SetValidTargets(ACTOR_OBJECT | ACTOR_VEHICLE); //SetGroupID(CGROUP_FIREHOSE); SetGroupLeader(true); SetPossibleCallers(ACTOR_PERSON); SetPossibleEquipment(EQUIP_FIREHOSE); //SetRestrictions2(RESTRICT2_ISHYDRANTORSELF); SetPriority(220); } bool CheckGroupVisibility(GameObject *Caller) { if(!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON) return false; return (Caller->GetFirehoseID() == 0 || Caller->GetFirehoseID() != 0); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { if(!Caller->IsValid() || !Target->IsValid() || (Caller->GetID()==Target->GetID())) return false; if(Caller->GetType() != ACTOR_PERSON) return false; Person p(Caller); if (p.GetEnteredCarID() != -1) return false; SetCursor("AttachFireHose"); if (Caller->GetEquipment() == EQUIP_FIREHOSE && Caller->GetFirehoseID() != 0 && Target->GetType() == ACTOR_VEHICLE) { GameObject hydrant = Caller->GetHydrant(); Vehicle v(Target); if ((hydrant.GetType() == ACTOR_OBJECT || StrCompare(hydrant.GetPrototypeFileName(), PROTO_WATER_TANKER) == 0) && v.IsChildEnabled(CHILD_WATER_SUPPLY) && v.GetEnergy() > 0.1f * v.GetMaxEnergy()) { if ((StrCompare(v.GetPrototypeFileName(), PROTO_WATER_TANKER) == 0 && !v.HasCommand("DummyWaterSupplyOn") && hydrant.GetType() == ACTOR_OBJECT) || (StrCompare(v.GetPrototypeFileName(), PROTO_WATER_TANKER) != 0 && !v.HasCommand("DummyWaterSupplyOn") && !v.HasCommand("DummyWaterSupplyFromTankerOn"))) { SetCursor("attachwatersupply"); return true; } } } else if(Caller->GetEquipment()==EQUIP_FIREHOSE && Target->GetType() == ACTOR_VEHICLE && Caller->GetFirehoseID() == 0) { Vehicle v(Target); if(v.GetVehicleType() == VT_FIREFIGHTERS_GTF && v.GetEnergy() > 0.1f * v.GetMaxEnergy() && v.IsConnectorFree()) return true; } else if(Caller->GetEquipment()==EQUIP_FIREHOSE && Target->GetType() == ACTOR_OBJECT && Caller->GetFirehoseID() == 0) { GameObject obj(Target); if(obj.IsHydrant() && !obj.IsHydrantInUse()) return true; return false; } return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { Person p(Caller); if (Caller->GetFirehoseID() != 0) { GameObject hydrant = Caller->GetHydrant(); Vehicle v(Target); if (StrCompare(hydrant.GetPrototypeFileName(), PROTO_WATER_TANKER) == 0 && p.IsCommandEnabled("Extinguish")) { p.EnableCommand("Extinguish", false); p.EnableCommand("Cool", false); p.EnableAutoTarget(false); } } else if (!p.IsCommandEnabled("Extinguish")) { p.EnableCommand("Extinguish", true); p.EnableCommand("Cool", true); p.EnableAutoTarget(true); } Vehicle v(Target); if (v.HasCommand("DummyHasSiren") && v.HasCommand("VcmdAutoSirenOff")) Game::ExecuteCommand("DummyDisableSiren", &v, &v); if (childID == 0) //Initiate command { if (Caller->GetEquipment()==EQUIP_FIREHOSE && Caller->GetFirehoseID() != 0 && Target->GetType() == ACTOR_VEHICLE) { p.PushActionMove(ACTION_NEWLIST, v.GetChildPosition(CHILD_WATER_SUPPLY)); p.PushActionTurnTo(ACTION_APPEND, v.GetChildPosition(CHILD_WATER_SUPPLY)); p.PushActionExecuteCommand(ACTION_APPEND, "AttachFireHose", Target, 1, false); } else if (Target->GetType() == ACTOR_OBJECT) { p.PushActionMove(ACTION_NEWLIST, Target, TARGET_FREE_CONNECTOR); p.PushActionUseEquipment(ACTION_APPEND, Target, childID, 1.0f); } else if (v.GetVehicleType() == VT_FIREFIGHTERS_GTF && (v.HasCommand("EmptyCar") || v.HasName("extend_wye") || v.HasName("extend_hose"))) { p.PushActionMove(ACTION_NEWLIST, Target, TARGET_FREE_CONNECTOR); p.PushActionCheckFreeConnector(ACTION_APPEND, Target); p.PushActionUseEquipment(ACTION_APPEND, Target, childID, 1.0f); if (StrCompare(v.GetPrototypeFileName(), PROTO_WATER_TANKER) == 0) p.PushActionExecuteCommand(ACTION_APPEND, "AttachFireHose", Target, 5, false); } if (Target->GetType() == ACTOR_VEHICLE) { Vehicle v(Target); if (v.HasCommand("Cidea")) { v.EnableBlinker(BLT_BOTH); Game::ExecuteCommand("DUMMYOpenDoor1", &v, &v); Game::ExecuteCommand("DUMMYOpenDoor2", &v, &v); } } } if (childID == 1) //Install water supply line { if(v.HasCommand("DummyWaterSupplyOn") || (v.HasCommand("DummyWaterSupplyFromTankerOn") && StrCompare(v.GetPrototypeFileName(), PROTO_WATER_TANKER) != 0) || p.GetBoundingRadiusDistXYToObject(&v) > 50.f) { return; } GameObject hydrant = Caller->GetHydrant(); if (StrCompare(hydrant.GetPrototypeFileName(), PROTO_WATER_TANKER) == 0) { Vehicle hy(&hydrant); v.AssignCommand("DummyWaterSupplyFromTankerOn"); hy.AssignCommand("DummyWaterSupplyFromTankerOn"); Game::ShowHelpTextWindow("Supply line hose from water tanker attached to vehicle", 2.f); } else { v.AssignCommand("DummyWaterSupplyOn"); Game::ShowHelpTextWindow("Supply line hose attached to vehicle", 2.f); } float r[9]; p.SetPosition(v.GetChildPosition(CHILD_WATER_SUPPLY)); p.SetAnimation("none"); Audio::PlaySample3D("mod:Audio/FX/equipment/hosecoupling.wav", v.GetChildPosition(CHILD_WATER_SUPPLY)); p.SetResistance(INJUREREASON_UNKNOWN, 100000.0f); p.SetResistance(INJUREREASON_CONTAM_ATOM, 100000.0f); p.SetResistance(INJUREREASON_CONTAM_CHEM, 100000.0f); p.SetResistance(INJUREREASON_CONTAM_BIO, 100000.0f); p.SetUserData(v.GetID()); Person n = Game::CreatePerson(p.GetPrototypeFileName(), Caller->GetName()); p.GetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]); Vector PerPos = p.GetPosition(); if (n.IsValid()) { Game::FindFreePosition(&n, PerPos, 100.f); n.SetPosition(PerPos); n.SetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]); n.SetPlayerMP(p.GetPlayerMP()); n.SetHealth(p.GetHealth()); n.SetUpgradeLevel(3); if(p.IsSelected()) { n.Select(); p.Deselect(); } p.EnableAutoTarget(false); if (StrCompare(hydrant.GetPrototypeFileName(), PROTO_WATER_TANKER) == 0) p.AssignCommand("DummyWaterSupplyFromTankerOn"); else p.AssignCommand("DummyWaterSupplyOn"); p.SetFlag(OF_HIDDEN); if (p.HasCommand("VcmdRapidDeployment")) { p.RemoveCommand("VcmdRapidDeployment"); if (v.GetVehicleType() == VT_FIREFIGHTERS_GTF) { n.PushActionMove(ACTION_APPEND, &v, TARGET_EQUIPMENTDOOR); n.PushActionTurnTo(ACTION_APPEND, &v); n.PushActionGetEquipment(ACTION_APPEND, &v, EQUIP_FIREHOSE); n.PushActionMove(ACTION_APPEND, &v, TARGET_FREE_CONNECTOR); n.PushActionCheckFreeConnector(ACTION_APPEND, &v); n.PushActionUseEquipment(ACTION_APPEND, &v, childID, 1.0f); } if (v.GetVehicleType() == VT_FIREFIGHTERS_DLK && v.IsBasketEmpty()) n.PushActionExecuteCommand(ACTION_APPEND, "EnterBasket", &v, 0, false); } } } if (childID == 2) //Remove water supply line { float r[9]; p.GetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]); GameObjectList list = p.GetObjectsInRange(800.0f, ACTOR_PERSON); for(int i = 0; i < list.GetNumObjects(); i++) { Person n = list.GetObject(i); if (n.GetUserData() == v.GetID() && (n.HasCommand("DummyWaterSupplyOn") || n.HasCommand("DummyWaterSupplyFromTankerOn"))) { n.ClearFlag(OF_HIDDEN); n.PushActionSwitchAnim(ACTION_NEWLIST, "idle"); if (p.IsSelected()) n.Select(); n.SetUserData(0); if (n.HasCommand("DummyWaterSupplyOn")) n.RemoveCommand("DummyWaterSupplyOn"); if (v.HasCommand("DummyWaterSupplyOn")) v.RemoveCommand("DummyWaterSupplyOn"); if (v.HasCommand("DummyWaterSupplyFromTankerOn") && StrCompare(v.GetPrototypeFileName(), PROTO_WATER_TANKER) != 0) v.RemoveCommand("DummyWaterSupplyFromTankerOn"); n.SetResistance(INJUREREASON_UNKNOWN, 0.0f); n.SetResistance(INJUREREASON_CONTAM_ATOM, 0.0f); n.SetResistance(INJUREREASON_CONTAM_CHEM, 0.0f); n.SetResistance(INJUREREASON_CONTAM_BIO, 0.0f); n.SetPosition(p.GetPosition()); n.SetRotation(&p); if (n.HasCommand("DummyWaterSupplyFromTankerOn") && p.HasCommand("VcmdRapidDeployment")) n.PushActionExecuteCommand(ACTION_APPEND, "RemoveFirehose", &v, 3, false); else if (p.HasCommand("VcmdRapidDeployment")) n.PushActionExecuteCommand(ACTION_APPEND, "RemoveFirehose", &v, 1, false); if (n.HasCommand("DummyWaterSupplyFromTankerOn")) { GameObject hydrant = n.GetHydrant(); Vehicle hy(&hydrant); hy.RemoveCommand("DummyWaterSupplyFromTankerOn"); n.RemoveCommand("DummyWaterSupplyFromTankerOn"); } else n.EnableAutoTarget(true); p.PushActionDeleteOwner(ACTION_NEWLIST); } } } if (childID == 3) { p.AssignCommand("VcmdRapidDeployment"); } if (childID == 4) { if (p.GetEquipment() == EQUIP_FIREHOSE) p.SetEquipment(EQUIP_NONE); p.PushActionMove(ACTION_NEWLIST, v.GetChildPosition("water_supply")); p.PushActionExecuteCommand(ACTION_APPEND, "AttachFireHose", &v, 3, false); p.PushActionExecuteCommand(ACTION_APPEND, "AttachFireHose", &v, 2, false); } if (childID == 5) //disable extinguish and cool commands for tanker guy { p.EnableCommand("Extinguish", false); p.EnableCommand("Cool", false); p.EnableAutoTarget(false); p.ClearActions(); } }};object DummyWaterSupplyOn : CommandScript{ DummyWaterSupplyOn() { SetGroupID(29); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { }};object DummyWaterSupplyFromTankerOn : CommandScript{ DummyWaterSupplyFromTankerOn() { SetGroupID(29); } bool CheckTarget(GameObject *Caller, Actor *Target, int childID) { return false; } void PushActions(GameObject *Caller, Actor *Target, int childID) { }}; 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 DummyCheckWaterSupplyIf 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. Quote Link to comment Share on other sites More sharing options...
eyespy900 Posted September 6, 2013 Report Share Posted September 6, 2013 thanks got the reply mate, unfortunatly this did not work. i will zip the scripts up and send them here pete Quote Link to comment Share on other sites More sharing options...
eyespy900 Posted September 6, 2013 Report Share Posted September 6, 2013 here are all the scripts i have. Quote Link to comment Share on other sites More sharing options...
The Loot Posted September 7, 2013 Report Share Posted September 7, 2013 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 DummyCheckWaterSupplyIf 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.e4pHowever, 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.fp_freeplay.rarCommand.rar (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.) Quote Link to comment Share on other sites More sharing options...
Hoppah Posted September 11, 2013 Author Report Share Posted September 11, 2013 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.emergency-planet.com/index.php?/topic/18262-released-limited-water-supply-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. Quote Link to comment Share on other sites More sharing options...
sgtmatt325 Posted September 12, 2013 Report Share Posted September 12, 2013 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 Quote Link to comment Share on other sites More sharing options...
CFDDIVE11 Posted September 12, 2013 Report Share Posted September 12, 2013 Only problem for me is I can't figure how to get it working (yes I have used the tutorial that was made) Quote Link to comment Share on other sites More sharing options...
Hoppah Posted September 12, 2013 Author Report Share Posted September 12, 2013 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) != 0You 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. Quote Link to comment Share on other sites More sharing options...
The Loot Posted September 12, 2013 Report Share Posted September 12, 2013 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) != 0You 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. Quote Link to comment Share on other sites More sharing options...
sgtmatt325 Posted September 13, 2013 Report Share Posted September 13, 2013 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) Quote Link to comment Share on other sites More sharing options...
mariuswww Posted September 20, 2013 Report Share Posted September 20, 2013 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? Quote Link to comment Share on other sites More sharing options...
The Loot Posted September 20, 2013 Report Share Posted September 20, 2013 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. Quote Link to comment Share on other sites More sharing options...
mariuswww Posted September 21, 2013 Report Share Posted September 21, 2013 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.. Quote Link to comment Share on other sites More sharing options...
Miercolini Posted November 14, 2013 Report Share Posted November 14, 2013 Has anyone successfully got the newest version working in a mod? Quote Link to comment Share on other sites More sharing options...
The Loot Posted November 14, 2013 Report Share Posted November 14, 2013 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. Quote Link to comment Share on other sites More sharing options...
Hoppah Posted November 15, 2013 Author Report Share Posted November 15, 2013 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. Quote Link to comment Share on other sites More sharing options...
The Loot Posted November 16, 2013 Report Share Posted November 16, 2013 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. Quote Link to comment Share on other sites More sharing options...