Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab » A Small Compilation of New Features
|
|
|
Re: A Small Compilation of New Features[message #313836]
|
Thu, 03 January 2013 18:09
|
|
Sandro |
|
Messages:420
Registered:November 2008 Location: Mars |
|
|
Flugente:
I am pretty sure I've used the correct STI. I believe the dirt system was implemented after my features, so it is possible someone else used older STI and overwrote mine. Nevertheless, you may look into the code of dirt system and alt weapon holding system to see whether they adress the same pic number in the STI. If so, it needs to be changed first, then re-add the pic of alternative weapon holding.
Don't expect much initiative from me though. I am on loooooong vacation.
LootFragg:
1) No, it is suitable for both OCTH and NCTH, even that it is a penalty in one and bonus in the other. In NCTH it makes more sense - you aim faster, but can't reach an accuracy anywhere near like when you fire from shoulder. In OCTH it doesn't matter much, since you probably don't want to spend too much APs for aiming firing from hip anyway.
2) Yes. 0 means number of aim levels from hip is the same as from shoulder.
3) As Strohmann says. No need to inverse anything, it applies both to NCTH and OCTH the same.
Good to see you.
Report message to a moderator
|
|
|
|
|
Re: A Small Compilation of New Features[message #313852]
|
Fri, 04 January 2013 00:29
|
|
LootFragg |
|
Messages:349
Registered:August 2009 Location: Berlin, Germany |
|
|
SandroIn NCTH it makes more sense - you aim faster, but can't reach an accuracy anywhere near like when you fire from shoulder. Ah, I see. So aiming the gun will be possible quickly but with worse results than from the shoulder. That was where I was stuck, I mistakenly thought maximum aim meant the same accuracy for both stances, not thinking of the aiming penalty.
Sandroit is suitable for both OCTH and NCTH You're thinking of everything. Nice.
SandroI am on loooooong vacation. Hope you're enjoying it. Thanks for the help. It's appreciated. I've only recently developed a fresh appetite for JA2 after a long period of ArmA 2 and not playing at all. It feels awesome to check for updates and find those amazing projects of yours (and others). I feel excited. It's also great to find you in the forums for help when needed. It's good to 'see' you, too. I wish you just the right mixture of relaxation and adventure for your New Year's vacation. Have a great time, Sandro.
Edit: Said value, by the way, has a semicolon (";") added. I have no idea if that works in the same line. I have once tried adding a comment using a semicolon and the game told me the value "TRUE;Commentblahblah" wasn't valid. You may want to check the SVN file and update the value accordingly if you haven't done so, yet.
Edit 2: Ctrl + Shift + LMB doesn't make my mercs jump over tiles when clicking 2 tiles away, it makes them move there in a straight line and pick something up. Is that function disabled?
[Updated on: Fri, 04 January 2013 19:27] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: A Small Compilation of New Features[message #314154]
|
Fri, 11 January 2013 19:44
|
|
LootFragg |
|
Messages:349
Registered:August 2009 Location: Berlin, Germany |
|
|
I agree with krux. Use [Shift] + [J] as with window jumping. That would be somewhat intuitive and actually enhance that function instead of adding a new one. It then means "move over two squares in the direction you are facing, either through windows or over low obstacles".
I don't know if you have allowed for 3 tile jumping (long jumps). In that case, things would get a bit more difficult as the game would have to know what tile to jump to, meaning the cursor needs to be involved, as you say, by aiming on an empty distant spot. Still, I think [Shift] + [J] would be the best combination if you can make sure that jumping through windows gets priority when facing a window.
Consider that jumping won't be used often, usually in cases when you'd have to walk around a tiny rubble obstacle that prevents you from exiting a destroyed building through the broken wall or to hop over someone on the ground. Or a cowering child, that would be fun. I doubt it needs a quick hotkey for frequent use. I guess it'll cost plenty of APs.
Say, the way you intended it, will hopping over rocks and similar obstacles be possible with the "hop over shit" animation? Anything at less than chest height with no overhead obstruction, that is.
Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: A Small Compilation of New Features[message #316949]
|
Wed, 03 April 2013 00:24
|
|
merc05 |
|
Messages:90
Registered:January 2013 |
|
|
At the end of Handle UI.cpp file is a block called BOOLEAN IsValidJumpLocation( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fCheckForPath )
There is a line at 6924 and another at 7057 that checks whether Shift+Ctrl are pressed.
This is the code from my disk where I have changed this to Alt (original code after "//")
// This function contains the logic for allowing the player
// to jump over people.
BOOLEAN IsValidJumpLocation( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fCheckForPath )
{
// SANDRO: been here, did mess
INT32 sFourGrids[4], sDistance=0, sSpot, sInBetween, sInBetween2, iDoorGridNo;
static const UINT8 sDirs[4] = { NORTH, EAST, SOUTH, WEST };
//INT32 cnt;
UINT8 ubGuyThere, ubMovementCost, ubDirection;
INT8 bTileHeight = 0;
// SANDRO: commented out to allow jumping even in cases we could get to the destination normally
// First check that action point cost is zero so far
// ie: NO PATH!
/*if ( gsCurrentActionPoints != 0 && fCheckForPath )
{
return( FALSE );
}*/
// Loop through positions...
for (INT8 cnt = 0; cnt < 4; cnt++)
{
// MOVE OUT TWO DIRECTIONS
sInBetween = NewGridNo( sGridNo, DirectionInc( sDirs[ cnt ] ) );
// SANDRO: moved this someplace else and made it more fluid
// ATE: Check our movement costs for going through walls!
/*ubMovementCost = gubWorldMovementCosts[ sIntSpot ][ sDirs[ cnt ] ][ pSoldier->pathing.bLevel ];
if ( IS_TRAVELCOST_DOOR( ubMovementCost ) )
{
ubMovementCost = DoorTravelCost( pSoldier, sIntSpot, ubMovementCost, (BOOLEAN) (pSoldier->bTeam == gbPlayerNum), &iDoorGridNo );
}*/
// If we have hit an obstacle, STOP HERE
//if ( ubMovementCost >= TRAVELCOST_BLOCKED )
//{
// // no good, continue
// continue;
//}
// TWICE AS FAR!
sFourGrids[cnt] = sSpot = NewGridNo( sInBetween, DirectionInc( sDirs[ cnt ] ) );
// Is the soldier we're looking at here?
ubGuyThere = WhoIsThere2( sSpot, pSoldier->pathing.bLevel );
// Alright folks, here we are!
if ( ubGuyThere == pSoldier->ubID )
{
// Double check OK destination......
if ( NewOKDestination( pSoldier, sGridNo, TRUE, (INT8)gsInterfaceLevel ) && IsLocationSittable( sGridNo, pSoldier->pathing.bLevel ) )
{
// If the soldier in the middle of doing stuff?
if ( !pSoldier->flags.fTurningUntilDone )
{
// OK, NOW check if there is a guy in between us
//
// SANDRO: made this a bit different - if we hold down the shift key, and pointing at a spot 2 tiles away, we check if jumping
// there is possible for all cases, and if it is, then we juuuuumpppp!
// So we don't care if there is a guy on the ground there, and the cursor wont appear atutomatically anymore
//
//ubGuyThere = WhoIsThere2( sIntSpot, pSoldier->pathing.bLevel );
// Is there a guy and is he prone?
//if ( ubGuyThere != NOBODY && ubGuyThere != pSoldier->ubID && gAnimControl[ MercPtrs[ ubGuyThere ]->usAnimState ].ubHeight == ANIM_PRONE )
//{
// // It's a GO!
// return( TRUE );
//}
//else
// Can't jump from a water tile (but we can jumpt TO a water tile)
if ( pSoldier->MercInWater() )
{
return( FALSE );
}
// check for cliffs and similar oddities
if ( gpWorldLevelData[ sGridNo ].sHeight != gpWorldLevelData[ sSpot ].sHeight )
{
return( FALSE );
}
// If there's a guy here, and he's not prone, we can't jump over him (maybe the way we hop over fence when he's crouched? lol)
ubGuyThere = WhoIsThere2( sInBetween, pSoldier->pathing.bLevel );
if ( ubGuyThere != NOBODY && ubGuyThere != pSoldier->ubID )
{
if ( gAnimControl[ MercPtrs[ ubGuyThere ]->usAnimState ].ubHeight != ANIM_PRONE )
{
return( FALSE );
}
else if ( gsCurrentActionPoints == 0 || !fCheckForPath )
{
return( TRUE );
}
}
// Get the height of stuff on the tile, we can only jump over low obstacles like this
bTileHeight = GetTallestStructureHeight( sInBetween, pSoldier->pathing.bLevel );
if ( bTileHeight > 0 && !IsLocationSittableExcludingPeople( sInBetween, pSoldier->pathing.bLevel ) && !( pSoldier->pathing.bLevel && FlatRoofAboveGridNo( sInBetween ) ))
{
return( FALSE );
}
// Check again for these structures as they may have odd height preset
if (( FindStructure( sInBetween, STRUCTURE_TREE ) != NULL || FindStructure( sInBetween, STRUCTURE_FENCE ) != NULL ||
FindStructure( sInBetween, STRUCTURE_WIREFENCE ) != NULL || FindStructure( sInBetween, STRUCTURE_VEHICLE ) != NULL ||
FindStructure( sInBetween, STRUCTURE_CAVEWALL ) != NULL ) && !IsLocationSittableExcludingPeople( sInBetween, pSoldier->pathing.bLevel ))
{
return( FALSE );
}
// Now check for walls between the tiles
// Between our tile and the middle tile...
ubDirection = GetDirectionToGridNoFromGridNo( sInBetween, pSoldier->sGridNo );
ubMovementCost = gubWorldMovementCosts[ pSoldier->sGridNo ][ ubDirection ][ pSoldier->pathing.bLevel ];
if ( IS_TRAVELCOST_DOOR( ubMovementCost ) )
{
ubMovementCost = DoorTravelCost( pSoldier, pSoldier->sGridNo, ubMovementCost, (BOOLEAN) (pSoldier->bTeam == gbPlayerNum), &iDoorGridNo );
}
if ( ubMovementCost >= TRAVELCOST_BLOCKED )
{
return( FALSE );
}
// Between destination tile and the middle tile...
ubDirection = GetDirectionToGridNoFromGridNo( sInBetween, sGridNo );
ubMovementCost = gubWorldMovementCosts[ sGridNo ][ ubDirection ][ pSoldier->pathing.bLevel ];
if ( IS_TRAVELCOST_DOOR( ubMovementCost ) )
{
ubMovementCost = DoorTravelCost( pSoldier, sGridNo, ubMovementCost, (BOOLEAN) (pSoldier->bTeam == gbPlayerNum), &iDoorGridNo );
}
if ( ubMovementCost >= TRAVELCOST_BLOCKED )
{
return( FALSE );
}
if( !(_KeyDown( SHIFT ) && _KeyDown( ALT )) ) //if( !(_KeyDown( SHIFT ) && _KeyDown( CTRL )) )
{
return( FALSE );
}
// If we got here, we are good to go
return ( TRUE );
}
}
}
// Attempt to long jump
else
{
// 3 TILES FAR!
sInBetween2 = sSpot;
sSpot = NewGridNo( sInBetween2, DirectionInc( sDirs[ cnt ] ) );
// Is the soldier we're looking at here?
ubGuyThere = WhoIsThere2( sSpot, pSoldier->pathing.bLevel );
// Alright folks, here we are!
if ( ubGuyThere == pSoldier->ubID )
{
// Double check OK destination......
if ( NewOKDestination( pSoldier, sGridNo, TRUE, (INT8)gsInterfaceLevel ) && IsLocationSittable( sGridNo, pSoldier->pathing.bLevel ) )
{
// If the soldier in the middle of doing stuff?
if ( !pSoldier->flags.fTurningUntilDone )
{
// Can't jump from a water tile (but we can jumpt TO a water tile)
if ( pSoldier->MercInWater() )
{
return( FALSE );
}
// This ain't gonna happen with backpack
if((UsingNewInventorySystem() == true) && FindBackpackOnSoldier( pSoldier ) != ITEM_NOT_FOUND )
{
return( FALSE );
}
// check for cliffs and similar oddities
if ( gpWorldLevelData[ sGridNo ].sHeight != gpWorldLevelData[ sSpot ].sHeight )
{
return( FALSE );
}
// If there's a guy on any of the two middle tiles, and he's not prone, we can't jump over him
ubGuyThere = WhoIsThere2( sInBetween, pSoldier->pathing.bLevel );
if ( ubGuyThere != NOBODY && ubGuyThere != pSoldier->ubID && gAnimControl[ MercPtrs[ ubGuyThere ]->usAnimState ].ubHeight != ANIM_PRONE )
{
return( FALSE );
}
ubGuyThere = WhoIsThere2( sInBetween2, pSoldier->pathing.bLevel );
if ( ubGuyThere != NOBODY && ubGuyThere != pSoldier->ubID && gAnimControl[ MercPtrs[ ubGuyThere ]->usAnimState ].ubHeight != ANIM_PRONE )
{
return( FALSE );
}
// Get the height of stuff on both middle tiles, we can only jump over low obstacles
bTileHeight = GetTallestStructureHeight( sInBetween, pSoldier->pathing.bLevel );
if ( bTileHeight > 0 && !IsLocationSittableExcludingPeople( sInBetween, pSoldier->pathing.bLevel ) && !( pSoldier->pathing.bLevel && FlatRoofAboveGridNo( sInBetween ) ))
{
return( FALSE );
}
bTileHeight = GetTallestStructureHeight( sInBetween2, pSoldier->pathing.bLevel );
if ( bTileHeight > 0 && !IsLocationSittableExcludingPeople( sInBetween2, pSoldier->pathing.bLevel ) && !( pSoldier->pathing.bLevel && FlatRoofAboveGridNo( sInBetween2 ) ))
{
return( FALSE );
}
// Check again for these structures as they may have odd height preset
if (( FindStructure( sInBetween, STRUCTURE_TREE ) != NULL || FindStructure( sInBetween, STRUCTURE_FENCE ) != NULL ||
FindStructure( sInBetween, STRUCTURE_WIREFENCE ) != NULL || FindStructure( sInBetween, STRUCTURE_VEHICLE ) != NULL ||
FindStructure( sInBetween, STRUCTURE_CAVEWALL ) != NULL ) && !IsLocationSittableExcludingPeople( sInBetween, pSoldier->pathing.bLevel ))
{
return( FALSE );
}
if (( FindStructure( sInBetween2, STRUCTURE_TREE ) != NULL || FindStructure( sInBetween2, STRUCTURE_FENCE ) != NULL ||
FindStructure( sInBetween2, STRUCTURE_WIREFENCE ) != NULL || FindStructure( sInBetween2, STRUCTURE_VEHICLE ) != NULL ||
FindStructure( sInBetween2, STRUCTURE_CAVEWALL ) != NULL ) && !IsLocationSittableExcludingPeople( sInBetween2, pSoldier->pathing.bLevel ))
{
return( FALSE );
}
// Now check for walls between the tiles
// Between our tile and the middle tile next to us...
ubDirection = GetDirectionToGridNoFromGridNo( sInBetween2, pSoldier->sGridNo );
ubMovementCost = gubWorldMovementCosts[ pSoldier->sGridNo ][ ubDirection ][ pSoldier->pathing.bLevel ];
if ( IS_TRAVELCOST_DOOR( ubMovementCost ) )
{
ubMovementCost = DoorTravelCost( pSoldier, pSoldier->sGridNo, ubMovementCost, (BOOLEAN) (pSoldier->bTeam == gbPlayerNum), &iDoorGridNo );
}
if ( ubMovementCost >= TRAVELCOST_BLOCKED )
{
return( FALSE );
}
// Between destination tile and the middle tile next to it...
ubDirection = GetDirectionToGridNoFromGridNo( sInBetween, sGridNo );
ubMovementCost = gubWorldMovementCosts[ sGridNo ][ ubDirection ][ pSoldier->pathing.bLevel ];
if ( IS_TRAVELCOST_DOOR( ubMovementCost ) )
{
ubMovementCost = DoorTravelCost( pSoldier, sGridNo, ubMovementCost, (BOOLEAN) (pSoldier->bTeam == gbPlayerNum), &iDoorGridNo );
}
if ( ubMovementCost >= TRAVELCOST_BLOCKED )
{
return( FALSE );
}
// Now we need to check if there is not a wall between the two middle tiles
ubDirection = GetDirectionToGridNoFromGridNo( sInBetween2, sInBetween );
switch (ubDirection)
{
case NORTH:
if ( WallOrClosedDoorExistsOfTopLeftOrientation( sInBetween ) )
return( FALSE );
break;
case EAST:
if ( WallOrClosedDoorExistsOfTopRightOrientation( sInBetween2 ) )
return( FALSE );
break;
case SOUTH:
if ( WallOrClosedDoorExistsOfTopLeftOrientation( sInBetween2 ) )
return( FALSE );
break;
case WEST:
if ( WallOrClosedDoorExistsOfTopRightOrientation( sInBetween ) )
return( FALSE );
break;
default:
return( FALSE );
break;
}
if( !(_KeyDown( SHIFT ) && _KeyDown( ALT )) ) //if( !(_KeyDown( SHIFT ) && _KeyDown( CTRL )) )
{
return( FALSE );
}
// If we got here, we are good to go
return ( TRUE );
}
}
}
}
}
return( FALSE );
}
Report message to a moderator
|
Corporal 1st Class
|
|
|
Re: A Small Compilation of New Features[message #316950]
|
Wed, 03 April 2013 00:38
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
Hmmm. That works, however, this causes very weird stuff when jumping over fences... the merc perfroms the jumping animation... on the tile behind him. Ordering him to jump a fence causes him to jump backwards oO.
Edit: Anyway, its in (r5977). The animation is the running animation, so the merc runs through the other guy instead of jumping... is that intended?
[Updated on: Wed, 03 April 2013 00:51] by Moderator Report message to a moderator
|
|
|
|
Re: A Small Compilation of New Features[message #316975]
|
Wed, 03 April 2013 14:28
|
|
merc05 |
|
Messages:90
Registered:January 2013 |
|
|
FlugenteHmmm. That works, however, this causes very weird stuff when jumping over fences... the merc perfroms the jumping animation... on the tile behind him. Ordering him to jump a fence causes him to jump backwards oO.
That's strange. I don't seem to have this issue, either with jumping over fences or through windows. I'll see if this starts happening with the new exe. EDIT: Correction, that does happen in my game. It happens when holding Alt while attemting to jump over a fence. But I don't think it has anything to do with changing this keyset as it doesn't even display the jump over obstacle cursor when this bug appears. Looks like an omitted bug with jump over fence command (I think it has something to do with Alt key making the merc strafe backwards).
FlugenteEdit: Anyway, its in (r5977). The animation is the running animation, so the merc runs through the other guy instead of jumping... is that intended?
That was the original behaviour. I think there is no animation for long jump made.
[Updated on: Wed, 03 April 2013 14:54] by Moderator Report message to a moderator
|
Corporal 1st Class
|
|
|
|
|
Re: A Small Compilation of New Features[message #320636]
|
Fri, 24 May 2013 18:50
|
|
arkanglesk |
|
Messages:29
Registered:June 2011 |
|
|
Hi there! I need some help with the weapon recoil feature...
I created a new Assault Rifle and put it into the game, it uses my own custom caliber and magazine. It's a lightweight 2.5kg (unloaded, no attachments) which uses 0.4 kg mags. It's got a 4x scope, reflex sight, laser sight, flash suppressor and keltec foregrip (the one that can be made a bipod).
Once everything is in place the little bugger weighs 3.9kg. Almost nothing, right? However, for some reason, it drains my mercs' energy when fired... no matter who's got it, from a medic w/75 strength to an auto-weapons specialist w/99 strength. Going prone does seem to reduce the drain but it's still waaay too much for this lightweight AR.
I've already tried reducing the value in the xml from its original 12 to 5 to 1... Effect is not reduced.
I thank you all in advance for any help
Report message to a moderator
|
Private 1st Class
|
|
|
Re: A Small Compilation of New Features[message #320678]
|
Fri, 24 May 2013 22:11
|
|
Strohmann |
|
Messages:287
Registered:August 2011 Location: Division Thought Crimes |
|
|
Description 1st page of this ThreadWeapon recoil kick:
This is a little different from struggling with weapon weight, it is about how much the gun "kicks" our shoulder (or hand).
Single shots may not prove much effect, but on autofire this may incure some nasty energy loss with certain guns.
The formula is based on weapon impact and weight, where weight actually help us out here, since it absorbs the back force of the recoil. Again, the cost is reduced by stance (nearly erased by bipod and/or weapon resting, greatly reduced when firing from hip), foregrip etc.
The ini setting represents percentual modifier to the final cost, so you can tweak it up or down as you like.
0 = disabled. 100 = default. Max is 250 (rather excessive).
Weapons.xmlxyz Items.xml
[Updated on: Fri, 24 May 2013 22:22] by Moderator Report message to a moderator
|
Master Sergeant
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 07:16:34 GMT+2 2024
Total time taken to generate the page: 0.02613 seconds
|