Home » SIRTECH CLASSICS » Jagged Alliance: Unfinished Business » Vanilla Modding » Air raids?
Air raids?[message #160630] Fri, 05 October 2007 13:18 Go to next message
Tyco is currently offline Tyco

 
Messages:188
Registered:September 2001
Location: Be'er Sheva, Israel
Whatever happened to the air raids? Is there a way to recover that script from the source code?

Report message to a moderator

Staff Sergeant
Re: Air raids?[message #160643] Fri, 05 October 2007 15:24 Go to previous messageGo to next message
gmonk

 
Messages:670
Registered:April 2002
Location: Newfoundland, Canada
If I recall correctly they were a little bit buggy and got disabled again.

Report message to a moderator

First Sergeant
Re: Air raids?[message #160766] Sat, 06 October 2007 11:48 Go to previous messageGo to next message
Tyco is currently offline Tyco

 
Messages:188
Registered:September 2001
Location: Be'er Sheva, Israel
Thats a shame. That was the coolest of all features that didn't make it to the final product. Really gave another flavor of danger to operation in queen-controled airspace.

But your telling me that the guys who are working on the source code can do all sorts of NEW features with it but no one can fix something that is already in there?

Report message to a moderator

Staff Sergeant
Re: Air raids?[message #160847] Sun, 07 October 2007 04:40 Go to previous messageGo to next message
Marlboro Man

 
Messages:1159
Registered:October 2005
Location: USA
It was harder to get working correctly than worth the effort at the time. And nobody has felt like fooling with it again in a while. I am sure someone will take an interest in it again eventually.

Report message to a moderator

Sergeant Major

Re: Air raids?[message #160861] Sun, 07 October 2007 11:23 Go to previous messageGo to next message
Tyco is currently offline Tyco

 
Messages:188
Registered:September 2001
Location: Be'er Sheva, Israel
:thumbsup:

Report message to a moderator

Staff Sergeant
Re: Air raids?[message #295694] Sun, 25 December 2011 14:13 Go to previous messageGo to next message
PasHancock is currently offline PasHancock

 
Messages:720
Registered:February 2011
Location: Estonia,Tallinn
Air Raids are in Rowa's TODO list,maybe we will see Raids again Smile

Report message to a moderator

First Sergeant
Re: Air raids?[message #295739] Mon, 26 December 2011 21:25 Go to previous messageGo to next message
public1983 is currently offline public1983

 
Messages:125
Registered:February 2006

I have found a sometimes endless loop in the vanilla air-raid code, which has not been fixed in 1.13 so far.
INT32 PickRandomLocationAtMinSpacesAway( INT32 sGridNo, INT16 sMinValue, INT16 sRandomVar )
{
	INT32 sNewGridNo = NOWHERE;
	INT16 sX, sY, sNewX, sNewY;
	INT32 cnt = 0;

	DebugMsg(TOPIC_JA2,DBG_LEVEL_3,"PickRandomLocationAtMinSpacesAway");

	sX = CenterX( sGridNo );
	sY = CenterY( sGridNo );
	
	while(TileIsOutOfBounds(sNewGridNo))
	{
		sNewX = sX + sMinValue + (INT16)Random( sRandomVar );
		sNewY = sY + sMinValue + (INT16)Random( sRandomVar );

		if ( Random( 2 ) )
		{
			sNewX = -1 * sNewX;
		}

		if ( Random( 2 ) )
		{
			sNewY = -1 * sNewY;
		}

		// Make gridno....
		sNewGridNo = GETWORLDINDEXFROMWORLDCOORDS( sNewY, sNewX );

		// Check if visible on screen....
		if(!GridNoOnVisibleWorldTile(sNewGridNo))//dnl ch56 141009
			sNewGridNo = NOWHERE;
		cnt++;
	}

	DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("PickRandomLocationAtMinSpacesAway: grid no = %d",sNewGridNo));
	return( sNewGridNo );
}

If sX and sY are too great, i.e. the target is too close to the lower right corner of the map this function never returns. It is called before every dive. My proposal:
static INT16 PickRandomLocationAtMinSpacesAway(INT16 sGridNo, INT16 sMinValue, INT16 sRandomVar)
{
	INT16 sNewGridNo = NOWHERE;

	INT16 sX, sY, sNewX, sNewY;

	sX = CenterX( sGridNo );
	sY = CenterY( sGridNo );

	while( sNewGridNo == NOWHERE )
	{
		//HB: never return if sX or sY too great, i.e. about sMinValue near the upper bounds?
		if ( Random( 2 ) )
		{
			sNewX = sX + sMinValue + (INT16)Random( sRandomVar );
		}
		else
		{
			sNewX = sX - sMinValue - (INT16)Random( sRandomVar );
		}

		if ( Random( 2 ) )
		{
			sNewY = sY + sMinValue + (INT16)Random( sRandomVar );
		}
		else
		{
			sNewY = sY - sMinValue - (INT16)Random( sRandomVar );
		}

		// Make gridno....
		sNewGridNo = GETWORLDINDEXFROMWORLDCOORDS( sNewY, sNewX );

		// Check if visible on screen....
		if ( !GridNoOnVisibleWorldTile( sNewGridNo ) )
		{
			sNewGridNo = NOWHERE;
		}
	}

	return( sNewGridNo );
}

I see here is not really the right place, but I do not want to bug anybody with PMs either.

I am experimenting with air raids with Stracciatella. My notion of a good integration into the strategic setting is that they are called before attack group arrivals to discourage player mercs to lie in ambush for defending a town sector. This makes perfectly sense, when passive militia defense is discouraged by greater loyalty penalization of losses, i.e. only Pyrrhic victories for passive defence. The time window is between 10 and 1 minutes before the attack, so the player has not the time to both dodge and defend.

The risk of friendly fire seemed unrealistic to me in the last realization of air raids in 1.13. I see, though, that they can be stopped by SAMs. I do not see a reactivation of SAM repair without more technical insight. In Vanilla the damaged radar leaves a pile of debris, but there must be a "damaged radar" tile somewhere in the tilesets to replace the radar after damage by a bomb. I did not locate it so far. Only thus the commented code makes sense to me. Without, it is a decision between a silent take out of the SAM with a well placed bomb and no watchman injured, so it is never repaired but also does not work for the player, or otherwise an occupation of the SAM defense for running cost and the benefit of less air raids.

Sorry for the long post. I am happy to see this topical.

[Updated on: Mon, 26 December 2011 21:26] by Moderator

Report message to a moderator

Sergeant
Re: Air raids?[message #295841] Wed, 28 December 2011 12:00 Go to previous messageGo to next message
PasHancock is currently offline PasHancock

 
Messages:720
Registered:February 2011
Location: Estonia,Tallinn
well lets hope we will see Raids in future

Would be cool if mercs could do air raids too!For big amount of money

Report message to a moderator

First Sergeant
Re: Air raids?[message #295951] Thu, 29 December 2011 22:18 Go to previous messageGo to next message
Callahan is currently offline Callahan

 
Messages:63
Registered:May 2006
Location: Germany
"Demise of man" can do that.
DoM is also already using player "purchased" air raids.

But it will be a lot of work to copy as you have to gather all scattered code parts that enable watching "fights" in sectors with no mercs.

One would be forced to go through all of my DoM modifications to find all parts concerning this.

Report message to a moderator

Corporal
JA2 DoM Creator
Re: Air raids?[message #295953] Thu, 29 December 2011 22:23 Go to previous messageGo to next message
lockie is currently offline lockie

 
Messages:3721
Registered:February 2006
Location: Scotland
Wasn't there some sort of crashy bug associated with air raids ?

Report message to a moderator

Captain

Re: Air raids?[message #295954] Thu, 29 December 2011 22:32 Go to previous message
Callahan is currently offline Callahan

 
Messages:63
Registered:May 2006
Location: Germany
I am using air raids on enemies extensively, but do not allow enemy air raids.
I had no crashes, and the only difference between my own and enemy air raids is the targeting function.

So there 'should' be no crashes on enemy raids.
But if I

Report message to a moderator

Corporal
JA2 DoM Creator
Previous Topic: Motivation to finish the game?
Next Topic: Drops all items, burst mode, attachments, inventory slots and merc panels in source code.
Goto Forum:
  


Current Time: Fri Mar 29 07:46:33 GMT+2 2024

Total time taken to generate the page: 0.01424 seconds