Halo: Total Conversion

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

FluX

Grizzled Veteran
Oct 26, 2010
5,395
234
63
www.fluxiserver.co.uk
Hmm now you have got me re-thinking if it's a string or not. It's a name of a class so maybe int is better? I think you're better off asking another just incase.
 

scary ghost

FNG / Fresh Meat
Sep 13, 2010
900
338
0
California
Something like this:

Code:
class HaloPawn extends SRHumanPawn;

var array<Frag> haloFragWpns;
var int currFragIndex;

simulated exec function SwapGrenade() {
    local int nextFragIndex;
    local Inventory inv, prevInv;

    nextFragIndex= currFragIndex + 1;
    if (nextFragIndex >= haloFragWpns.Length) {
        nextFragIndex= 0;
    }

    for(inv= Inventory; inv != none; inv= inv.Inventory) {
        if (inv == haloFragWpns[currFragIndex]) {
            log("Replacing"@haloFragWpns[currFragIndex].ItemName@"with"@haloFragWpns[nextFragIndex].ItemName);
            if (prevInv != none) {
                prevInv.Inventory= haloFragWpns[nextFragIndex];
            } else {
                Inventory= haloFragWpns[nextFragIndex];
            }
            haloFragWpns[nextFragIndex].Inventory= haloFragWpns[currFragIndex].Inventory;
            currFragIndex= nextFragIndex;
            break;
        }
        prevInv= inv;
    }
}

defaultproperties {
    RequiredEquipment(2)="HaloPackageName.HaloFragWeapon"
}
 
Last edited:

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
Something like this:

Interesting, I kinda get the jist of what that does but how to use it, I have no idea. Maybe I'll be able to think more clearly after I get a nap

What I got

Code:
class HaloPlayerController extends KFPCServ;

var array<Frag> HaloGrenadeNum;
var int currFragIndex;

simulated exec function SwapGrenade() 
{
    local int nextFragIndex;
    local Inventory inv, prevInv;

    nextFragIndex = currFragIndex + 1;
    if (nextFragIndex >= HaloGrenadeNum.Length) {
        nextFragIndex = 0;
    }

    for(inv= Inventory; inv != none; inv= inv.Inventory) {
        if (inv == HaloGrenadeNum[currFragIndex]) {
            log("Replacing"@HaloGrenadeNum[currFragIndex].ItemName@"with"@HaloGrenadeNum[nextFragIndex].ItemName);
            if (prevInv != none) {
                prevInv.Inventory = HaloGrenadeNum[nextFragIndex];
            } else {
                Inventory = HaloGrenadeNum[nextFragIndex];
            }
            HaloGrenadeNum[nextFragIndex].Inventory = HaloGrenadeNum[currFragIndex].Inventory;
            currFragIndex = nextFragIndex;
            break;
        }
        prevInv = inv;
    }
}

exec function ThrowGrenade()
{
    HaloPawn(Pawn).ThrowGrenade();
}

defaultproperties
{
     HaloGrenadeNum(0)=Class'HaloTC_Core.HaloGrenade'
     HaloGrenadeNum(1)=Class'HaloTC_Core.HaloGrenade'
     PawnClass=Class'HaloTC_Core.HaloPawn'
}
 
Last edited:

scary ghost

FNG / Fresh Meat
Sep 13, 2010
900
338
0
California
Appears the code above fails, will always return a bad cast in class error

Yes because you are assigning values of the wrong type. If you do not understand the difference between:
Code:
var class<Object> varA
and
Code:
var Object varB
then you need to take a step back and review your UnrealScript.
 

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
Yes because you are assigning values of the wrong type. If you do not understand the difference between:
Code:
var class<Object> varA
and
Code:
var Object varB
then you need to take a step back and review your UnrealScript.

I don't know the difference cause var class<Object> varA is something I have never fully dealt with. I learn UnrealScript as I go.

EDIT: Does the same if I try and use this as the defaults

Code:
HaloGrenadeNum(0)=Class'KFMod.Frag'
HaloGrenadeNum(1)=Class'KFMod.Frag'
Error:
ObjectProperty HaloTC_Core.HaloPlayerController.HaloGrenadeNum.HaloGrenadeNum: bad cast in 'Class'KFMod.Frag''
ObjectProperty HaloTC_Core.HaloPlayerController.HaloGrenadeNum.HaloGrenadeNum: bad cast in 'Class'KFMod.Frag''
 
Last edited:

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
Since the problem still persists I might aswell work on the melee system since this system is going nowhere
 

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
Everything is coming along nicely, the coding part of this may go by faster then expected
 

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
Sounds great, is it cause of that what you said to me on steam ? c:

Don't remember, the Grenade array is still a problem though

What I got so far

Code:
var array<HaloGrenade> HaloGrenadeType;
var int currFragIndex;

simulated exec function SwapGrenade() 
{
    local int nextFragIndex;
    local Inventory inv, prevInv;

    nextFragIndex = currFragIndex + 1;
    if (nextFragIndex >= HaloGrenadeType.Length) {
        nextFragIndex = 0;
    }

    for(inv= Inventory; inv != none; inv= inv.Inventory) {
        if (inv == HaloGrenadeType[currFragIndex]) {
            log("Replacing"@HaloGrenadeType[currFragIndex].ItemName@"with"@HaloGrenadeType[nextFragIndex].ItemName);
            if (prevInv != none) {
                prevInv.Inventory = HaloGrenadeType[nextFragIndex];
            } else {
                Inventory = HaloGrenadeType[nextFragIndex];
            }
            HaloGrenadeType[nextFragIndex].Inventory = HaloGrenadeType[currFragIndex].Inventory;
            currFragIndex = nextFragIndex;
            break;
        }
        prevInv = inv;
    }
}

exec function ThrowNade() 
{
    if (HaloGrenadeType[currFragIndex] != none && HaloWeapon(Pawn.weapon).IsWeaponReady())
    {
        if ( HaloGrenadeType[currFragIndex].GrenadeAmount > 0 && bZooming)
            EndZoom();

        HaloGrenadeType[currFragIndex].ThrowGrenade();
    }
}
 
Last edited:

BFMSAND

FNG / Fresh Meat
Dec 17, 2011
443
10
0
Rainbow Killing Floor
Ah ok, the code part must help you some other but i think you found what you need for your coding things ? Also looking forward as your project is gonna looking preety good mate :)
 

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
Things have slowed down abit as I am trying to figure out how to do some of Halo's effects like the Active Camo mask and heat meters on the weapons.

I also made a list of things that are impossible due to engine limits:

Overlay animations (When you turn the weapon moves slightly depending on the movement parameters in the overlay animation, somewhat like free-aim but more realistic)
Vehicle overlay animations (Same as above except applied to the unit inside the vehicle, like you hit a turn and he leans in the opposite direction)
Moving Animations (Not confirmed impossible yet)
Secondary, and Micro detail maps (used by most levels. Example: BloodGulch, IceFields, Timperland, Deathisland)
Make the pawn play a death animation then turn it into a ragdoll (Not confirmed to be impossible yet)
Sniper zoom distortion (Unknown how to do this, not impossble I'm sure)
Any kind of overlay animation can't be done sadly as far as I know. (All weapons and vehicles use them. Example: the shake that plays when you charge up the plasma pistol, moving animations, and units within vehicles (Plays a overlay animation for left-right, up-down, forward-back))
 
Last edited:

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
What is the function of these 'micro detail maps' in halo levels?

Bloodgulch for example the ground, the primary detail map is the sand, the secondary detail map is the grass and the micro detail map is a ground detail to make it look rocky like. Here is what the detail map looks like

detailground_zps1c2bd324.png


Icefields another example the primary detail map is the snow, the secondary detail is the ice, and micro detail map is the detail for ground.

So basicly micro detail maps are used to give the textures extra details without needing a highres ground bitmap or to keep the texture from looking plain and simple
 
Last edited:

slavek

Grizzled Veteran
May 4, 2006
3,075
943
113
UnrealEd: Viewport #1
I know Detail textures exist in KF however if I recall correctly they are not applied to staticmeshes or terrain. You could possibly apply them with projectors to get extra detail on your terrain.
 

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
I know Detail textures exist in KF however if I recall correctly they are not applied to staticmeshes or terrain. You could possibly apply them with projectors to get extra detail on your terrain.

They work in staticmeshes but not terrain if I remember correctly. What I was thinking of doing was finding a way to apply the details in a program like 3DS Max then bake a texture. They are pretty much required for them to look good cause the base ground bitmaps are incredibly low res and choppy

Here is an example of the Bloodgulch ground

bloodground_zps36655bcd.jpg
 
Last edited:

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
I also can't figure out how exactly to do this effect in Unreal Engine. It's the camo effect from Halo, what it does is overlays the model and biped with a shader effect powered by a distortion cubemap defined in the globals of the map. Basically makes you transparent with a distortion effect.

Here is a example
HaloCamo_zps9982159b.png
 
Last edited:

FluX

Grizzled Veteran
Oct 26, 2010
5,395
234
63
www.fluxiserver.co.uk
Personally I would maybe use the Stalkers system for this. I would make it replace the textures you want to both arms, character and weapon. Far easier to implement through a probably a bool and a check for each of the types (so if you made the bool in the controller (maybe better in the pawn thinking of it), the weapon etc would have to be able to access it's return and then give the answer back to them).
 

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
Personally I would maybe use the Stalkers system for this. I would make it replace the textures you want to both arms, character and weapon. Far easier to implement through a probably a bool and a check for each of the types (so if you made the bool in the controller (maybe better in the pawn thinking of it), the weapon etc would have to be able to access it's return and then give the answer back to them).

That would be the best way to do it, I was thinking of making a transparent texture with the same cubemap inside of a MaterialSequence to do the fade in and out of camo effect
 

forrestmark9

FNG / Fresh Meat
Nov 29, 2011
1,110
40
0
The turn animations are now shown to be impossible to do correct. So far since Halo's use of Overlays it will just play the turn animation very fast 5 times, his upperbody doesn't turn either like it does in Halo. I have no idea how to fix this