Jump to content

Hoppah

Members
  • Posts

    7,379
  • Joined

  • Last visited

  • Days Won

    283

Posts posted by Hoppah

  1. It's been a while, because I've been spending a lot of time on the limited water demo mod, but here I am with a big update on the army modification. The new version of the army mod will contain some new vehicles.

     

    There will be two new light vehicles, a quad and a light strike vehicle (sometimes referred to as desert patrol vehicle, lpv or lav, or simply dune buggy).

    post-4-0-08912900-1379373049.jpg

    *models not made by me. I found them on the internet somewhere and were uncredited. I believe they were originally taken from one of the Battlefield games.

     

    And then the MRAP Cougar. The texture still need some detail work, but I wanted to show the progress.

    post-4-0-65963700-1379373041.jpg

    *model made by me

     

    Another helicopter, the MH-6 Little Bird. As you can see on the screenshot, personnel is seen visible sitting on the outboard benches. The helo comes with a rapid insertion command.

    post-4-0-40198000-1379373030.jpg

    *model not made by me. I found it on the internet somewhere and were uncredited. I believe it was originally taken from one of the Battlefield games.

     

    With the help of MikeyPI I was able to do a whole new fleet of HMMWV's :happy: . We felt it was necessary to replace my HMMWV model, because it was simply too undetailed. MikeyPI originally made the HMMWV for the New York Modification to serve as a LRAD vehicle, but that one is not released to public yet, so with the advice from MikeyPI I made four different versions. Screenshot first:

    post-4-0-03862700-1379373022.jpg

    *credits: orginal HMMWV by MikeyPI, edited by me

     

    As you can see, the HMMWV is way more detailed than the older HMMWV, because of MikeyPI's great texturing skills. *drool

     

    Versions:

    - M998 HMMWV, which will simply replace the old HMMWV

    - M997 HMMWV Maxi Ambulance, which will replace the older HMMWV ambulance

    - M1038 Troop transport, this one will replace the old Transportation Truck which was not realistic (I think that model come from one of the GTA games). This vehicle will be usefull to transport detainees. :)

    - HMMWV with Active Denial System (ADS). (pic of the real thing) The M998 has an upgrade to the HMMWV ADS which will work the same as the LRAD on the current old HMMWV, except that the ADS will need to be installed first so it can fold up.

     

    Thanks to MikeyPI for the advice on the different versions.

     

     

     

     

    Hoppah

  2. It's because that VO is only used to position the truck, not to rotate the truck. A spawned object always faces a certain direction for default (north for example), so that's why all of them face the same direction. You will have to use another VO (or an object) as reference point to turn the vehicles towards. Know what I mean? That's how I do it with all parking scripts, in the LA mod as well as the army mod.

     

    EinzZweiHop!

     

    Sorry for my English

  3. 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.

  4. 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.

  5. 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 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.
  6. 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.

  7. Yeah..

    so I wasn't sure where to put this as it is a site related question.

    how do I use banners?

    Like

    Chester county montanna supporter

    or Red watch supporter?

     

    Since you already wrote something in your signature, I asume you know where to find the 'Edit signature' option on this forum.

     

    Lets say you want this awesome image in your signature:

     

    XZPREYo.gif

     

     

    You simply need the url to the picture and use the 'img' tags to show them.

    For this image the code would be

    [IMG]http://i.imgur.com/XZPREYo.gif[/IMG]

    explanation:

    [img] tag to openthen url to picture[/img] tag to close
  8. v1.2 released! Download link can be found on the first page: http://forum.emergency-planet.com/index.php?/topic/18262-released-limited-water-supply-logic/?p=258435

     

    post-4-0-97540900-1378045367.jpg
     

    New features:

    - Water Tanker vehicle (model by Freakinmusket)

    - Working water tanker functionality (you can supply fire engine's with the water tanker)

    - Extend hose command for fire fighters

    - 'Activate engine pump' command (to use hoses from an engine a fire fighter to control the pump panel is required)

    - New icons

    - Rapid deployment improvements + ladder vehicle compatibility

    - Several minor changes and fixes under 'the hood' (VcmdWaterSwitch renamed to VcmdCannonSwitch to prevent confusions with other scripts)

     

    Gameplay instructions

     

    Water Tanker

    You can install 1 hose from the water tanker to a fire engine, as well as a supply line from a hydrant to the tanker. The water tanker can not be used to extinguish fires by itself.

     

    Activate pumps

    You cannot use any installed hose from a fire engine if the pumps are not activated. You can activate the pumps of an engine in 3 (yes 3, wtf) different ways:

    - Use the 'Engine pumps on/off' command (requires a fire fighter in the vehicle). A fire fighter will exit the vehicle and take position at the pump panel.

    - Use the 'Rapid Deployment' command. Besides the four fire fighters who install their hoses to the fire engine, a fifth fire fighter will exit the vehicle to control the pumps.

    - Select an fire fighter who is not equipped and click on the engine after the hoses are installed.

    You can deactivate the pump by simply giving the fire fighter who is controlling the pumps a new command, or to use either the 'Engine pumps on/off' or 'Rapid Deployment' command to deinstall the fire engine.

    Note: it is not required to activate the pumps to use the deck gun of an engine.

     

    Rapid deployment

    Using 'rapid deploy' from the water tanker only works if the tanker is parked in the vicinity of a fire engine (and a hydrant). Two fire fighters will exit the vehicle and get a hose from the nearest fire engine. The first fire fighter will install a supply line from the tanker to the nearest fire engine. If a hydrant is in the vicinity of the tanker, the second fire fighter will install a supply line from that hydrant to the tanker in order to supply the tanker. 'Rapid undeploy' finds the nearest idle and unequipped fire fighter who will remove any install supply lines running from and to the water tanker.

     

    Rapid deployment is also compatible with DLK-vehicletypes (ladders) now. Using 'Rapid deploy', a fire fighter will install a supply line (if a hydrant is close) to the ladder vehicle and enter the basket. The other fire fighters inside the ladder will get a variety of equipment (pneumatic scissors, fire extinguisher, chainsaw, axe, jumppad and fire hose). 'Rapid undeploy' will only deinstall the entire vehicle, which means the fire fighter in the basket will exit the basket, remove the supply line (if present) and enter the vehicle.

     

    Important note for modders:

    Compared to the previous version, a lot has been changed in the new version. Vehicles have new ('PcmdPumpSwitch') and reamed commands ('VcmdCannonSwitch)' and a new child (for the pump controller) too. In case you want to implement the entire functionality to your own modification, please be aware that any vehicle in your mod will probably not be fully compatible with v1.2 anymore.

     

    Bugs in v1.2

     

    - The fire fighter who spawns outside to control the pump of a fire engine may not be recognized (script wise) by the vehicle sometimes, resulting in connected firehoses not working. To fix this, simply select the fire fighter and click on the fire engine to activate the pump again.
    - In a rare occasion, the water tanker may not be recognized by the script, resulting in a water tanker with fire engine traits (1000 gallon tank for example) and not being able to supply other vehicles. Especially after playing freeplay directly after the demo mission may cause this problem.

     

    Hope you like this upgrade :)

     

    Hoppah

  9. I think I got most of the new features to work in freeplay as well. I still want to give it a few extra tests before the next demo mode can be released.

     

     

    Summarized, the new update will contain the following new features:

     

    - Water Tanker vehicle (model by Freakinmusket)

    - Working water tanker functionality (you can supply fire engine's with the water tanker)

    - Extend hose command for fire fighters

    - 'Activate engine pump' command (to use hoses from an engine a fire fighter to control the pump panel is required)

    - New icons

    - Rapid deployment improvements + ladder vehicle compatibility

    - Several minor changes and fixes under 'the hood' (VcmdWaterSwitch renamed to VcmdCannonSwitch to prevent confusions with other scripts)

     

    Most of the scripts have been changed intensively for the water tanker functionality and the pump command, so if you have the logic already implemented in your mod, you probably need to do all the personal changes again unfortunately.

     

    Hoppah

  10. So is this going to be incorporated into a mod and then released? Because how are we going to use the tanker if we put this script into another mod?

     

    This demo mod is basically open source. Just like the current version that can be downloaded, I will release a new demo mod with the new features. You can try out or test the demo mod to see how it works. The scripts can be copied to other mods. Implementation in other modifications isn't that hard if you know what you're doing, I've already written a guide how to do that and which files are necessary. Someone else also made a guide with screenshots.

     

     

    H

  11. Yes, I believe the 100.f is for the Fire Plane, but Im not sure since I never really played with those values.

     

     

    Here's a screenshot of the current update I'm working on. You can see the new water tanker (thanks to FreakingMusket for the model!) and its connection to the fire engine.

    However, the water tanker feature is not finished yet since I've ran into some issues  :( . After I fixed that, I still need to convert the logic for the freeplay version, but shouldn't be too hard.

     
    post-4-0-97540900-1378045367.jpg
     

    The guy behind the fire engine is the guy who controls the pumps. Without this 'controllor' you will not be able to use the hoses on the engine.

     

    Hoppah

  12. Any chance you could go ahead with the fix for the aerials?

     

    Yea, it's a very easy fix actually.

     

    Open up WaterSupplyFreeplay.script and find the part of the code I copied in the spoiler and add the pointed out exclamation mark (the ! symbol).

     

    if (v.GetVehicleType() == VT_FIREFIGHTERS_DLK && v.IsInstalled() && v.IsUplifted() && !v.IsBasketEmpty())

    {

        PersonList DLKGuy(ROLE_SQUAD);

        for(int k = 0; k < DLKGuy.GetNumPersons(); k++)

        {

            if (DLKGuy.GetPerson(k)->CanUseDLKCannon() && DLKGuy.GetPerson(k)->GetEnteredCarID() == v.GetID())        

            {

                Person p(DLKGuy.GetPerson(k));

                if (WaterLevel <= 20)

                {

                    if (p.IsCommandEnabled("Extinguish"))

                    {

                        p.EnableCommand("Extinguish", false);

                        p.EnableCommand("Cool", false);

                        p.EnableAutoTarget(false);

                        p.ClearActions();

                        p.PushActionWait(ACTION_NEWLIST, 4.f);

                    }

                }

                else

                {

                    if (!p.IsCommandEnabled("Extinguish"))

                    {

                        p.EnableCommand("Extinguish", true);

                        p.EnableCommand("Cool", true);

                        p.EnableAutoTarget(true);

                    }

                }

            }

        }

    }

     

     

    Currently working on a step-by-step tutorial for adding the freeplay script to a mod and setting up the map, vehicles, people, deck gun dummies, and scripts. I'll be waiting for Hoppah's next revision before I release anything, but I've got all non-script steps written out already.

     

    Thanks! With the screenshots it should be easier to add everything. In regards to the scripting, you may add the scripting part that involves the freeplay scripts in the \Scripts\Missions\ folder, because nothing has changed to that.

  13. I am always for realism  :D its a shame that we can't have two FF and a hose line as well  :) mind you that would mean more units on scene.

     

    Although maybe more realistic, I don't know how to do that. Forcing players to always use 2 fire fighters to control 1 hose would be more annoying than fun too probably.

     

     

    I'd say yes. A little more complexity sounds good to me.

     

    Edit: A bug I forgot to report. If a person already has a firehose, they sometimes won't hook up to the vehicle during rapiddeployment. It's usually just one of them.

    Also, how can I make it so that rapiddeployment ignores certain person prototypes?

     

    Okey, I've started to work on the activate pump command.

     

    The rapid deployment issue (can't really call it a bug) sometimes happens. I'd say in 6 out of 10 times, all 4 fire fighters do hook up their hoses. Sometimes one of them can't find the connector indeed. Unfortunately, I can't really fix that and it's not a big issue imo. 

     

    In the next version of the demo, only fire fighters with the command "AttachFireHose" will do the rapid deploy. It's fairly easy to change that, but I suggest you wait for updated demo. :)

     

    There will be a lot of new functionalities in the updated demo mod with a lot of changes to scripts. You will probably have to do the personal changes all over again.

     

    Hoppah

  14. Got the water tanker to work in the mission script. It seems to work fine. Now I still gotta do the freeplay compatibility.

    I fixed the small ladder issue too, and the rapid deploy finds the closest hydrant (for the supply line) within a certain distance now instead of any hydrant within that distance.

     

    I'm still hesitating wether a command to the fire engine's (or the GTF vehicletype cars) which enables the pumps on the engine should be added to the mod. So I'm leaving this decision up to the forumppl and added a poll. Enabling that command would be required to use any hose and it will require 1 fire fighter to man the pump panel. It's a little more realism, and the chance of lag in freeplay MAY be less.

  15. Ah, no. It's the NYCGatedWye straight from your test mod. I only edited the pickup script I had already.

     

    Oh, I forgot to add something related to the hydrant distance check. Does it look for the closest one? I've had it go for a hydrant that isn't the closest one.

     

    Well the pickup script directs to the wye script and that's why I think the source of the problem can be found in that script. I suggest you wait for the next update, since there will be some changes to the wye anyway.

     

    The hydrant distance check, gets the first hydrant the game finds in a certain location, so it doesn't get the closest one necessarily. I'll probably change that later on.

     

     

    Small update, I've made the following changes for the upcoming version:

    - Holding SHIFT while clicking 'rapid deployment' will also activate the deck gun of the engine

    - Game shows a different icon when attaching a supply line now

    - 'Extend hose' command for fire fighters with a hose, so you can have longer hoses. The way it works is similar to the wye with the exception the fire fighter automatically installs a new hose to the 'extension object'. Just like the wye command, this addition may still be kinda buggy.

     

    Also:

    - WIP: water tanker script, this is going to be a very complex addition.

    - To do: possible ladder bug fix (I haven't confirmed this bug yet)

    - To do: rapid deployment hydrant distance check should find the closest available hydrant

    - To do: rapid deployment command for ladder vehicles

×
×
  • Create New...