Copy Human type

#1
Hi.

I want to show how to copy and edit Human type "ai" of Cryengine by the permission of ALLAH.
Also, there is a documentation about this from scratch:
http://docs.cryengine.com/display/SDKDO ... ing+Entity

Firstly, open "root(CRYENGINE-release)\Code\GameSDK\GameDll\GameFactory.cpp".
After copy this:(usually, line:236)

Code: Select all

REGISTER_FACTORY(pFramework, "Characters/Human", CPlayer, true);
After paste:(I will register as "StrangeHuman")

Code: Select all

REGISTER_FACTORY(pFramework, "Characters/StrangeHuman", CPlayer, true);
Now, you will see it by the permission of ALLAH. If you will try to add this into the level, it is possible to get error. I think the reason of that is there is no ".lua" files...
entity.png
entity.png (13.69 KiB) Viewed 797 times
Open this folder: GameSDK\Assets\Scripts\Entities\AI\Characters .
characters.png
characters.png (4.82 KiB) Viewed 797 times
Open "Scripts/Entities/AI/Characters/StrangeHuman.lua" file and edit. Find "Human" and replace with "StrangeHuman" like this (Note: this has been edited before):

Code: Select all

Script.ReloadScript( "SCRIPTS/Entities/AI/Characters/StrangeHuman_x.lua") Script.ReloadScript( "SCRIPTS/Entities/actor/BasicActor.lua") Script.ReloadScript( "SCRIPTS/Entities/AI/Shared/BasicAI.lua") CreateActor(StrangeHuman_x) StrangeHuman=CreateAI(StrangeHuman_x) Script.ReloadScript( "SCRIPTS/AI/Assignments.lua") InjectAssignmentFunctionality(StrangeHuman) AddDefendAreaAssignment(StrangeHuman) AddHoldPositionAssignment(StrangeHuman) AddCombatMoveAssignment(StrangeHuman) AddPsychoCombatAllowedAssignment(StrangeHuman) StrangeHuman:Expose()
After, open other file named "StrangeHuman_x.lua", find "Human" and replace with "StrangeHuman".

Code: Select all

Script.ReloadScript( "SCRIPTS/Entities/AI/Shared/AIBase.lua"); StrangeHuman_x = { --AnimationGraph = "humanfullbody.xml", --UpperBodyGraph = "humanupperbody.xml", ActionController = "Animations/Mannequin/ADB/humanControllerDefs.xml", <!--I never tried to change this!--> AnimDatabase3P = "Animations/Mannequin/ADB/human.adb", <!--I never tried to change this!--> SoundDatabase = "Animations/Mannequin/ADB/humanSounds.adb", <!--I never tried to change this!--> UseMannequinAGState = true, UseLegacyCoverLocator = false, gameP... ....fileModel = "Objects/characters/strange_humans/strange_human_a/strange_human_a.cdf", bUseFacialFrameRateLimiting = 1, equip_EquipmentPack = "Empty"........
The script is little bit long, that is the reason why I don't share it here.

That's all what you need to do to copy Human type.

Good bye,
ALLAH bless you.

Who is online

Users browsing this forum: No registered users and 1 guest