dhewm3-sdk/documents/Rivensin sdk change log and new script commands.txt

311 lines
12 KiB
Text

RUINER CHANGELOG by Ivan_the_B
/***********************************************************************
NEW/EDITED FILES
***********************************************************************/
------------------------------------------------
SUBJECT -> FILENAME sdk | game
------------------------------------------------
headshot system -> Weapon.cpp, Actor.cpp | damage.def, ai_monster_base.script
weapon HS enabled -> weapon_onslaught.def, weapon_ruinblade.def
monsters no HS -> monster_spirits.def, monster_demon_imp_nightmare.def
setOwner proj. fix -> Entity.cpp, Projectile.cpp and .h
dynamic friends -> AI.cpp | ai_monster_base.script
music volume system -> Script_Thread.cpp and .h, SysCvar.cpp and h | ff_musics.script, ai_player.script, speaker_music.def
load default cfg -> Game_local.cpp, SysCvar.cpp and h
new events -> Entity.cpp and .h, Player.cpp and .h, Weapon.cpp and .h, AI.cpp and .h, AI_events.cpp, Anim_Blend.cpp, Anim.h | doom_events.script
friendly damage -> Player.cpp and .h
maledict -> aas.def, pak666_maledict.pk4
fake proj. monster -> monster_projectile.def, ai_fake.script
melee for weapons -> Weapon.cpp and .h, Anim_Blend.cpp, Anim.h
combo system -> ai_player.script
full body player anim -> Player.cpp and .h, Physics_Player.cpp and .h | ai_player.script, weapon_base.script
pain system -> AI.cpp and .h, Actor.cpp and h | ai_monster_base.script, monster_default.def, all the script and def that uses it
dynamic spread -> weapon_advocate.script, weapon_onslaught.script
dynamic walkspeed -> Weapon.cpp and .h, Player.cpp
wall dodge -> ai_player.script
cursor object -> Player.cpp and .h ( code moved from Weapon.cpp and .h ), PlayerCursor.cpp
arrows -> Moveable.cpp and .h, Projectile.cpp and .h | arrow.def
secondary attack sys -> Weapon.cpp and .h, Player.cpp and .h | ai_player.script, weapon_base.script
kicks -> Player.cpp and .h, Anim_Blend.cpp, Anim.h | kicks.def
/***********************************************************************
New Entities (excluding monsters,projectiles...)
***********************************************************************/
music_speaker -> Speaker for musics
music_stop -> Trigger that calls the Script Function stop_music()
target_maledict_land -> Target for maledict_flying. Place it where it should teleport back after walking.
target_maledict_takeoff -> Target for maledict_flying. Place it where it should land.
moveable_arrow -> Spawned by the game for arrows projectiles. It automatically unbinds after a while, wait few secs, is removed.
/***********************************************************************
New Scriptevents
***********************************************************************/
------------------------------------------------
All entities
------------------------------------------------
scriptEvent float getEntityHealth();
scriptEvent void setEntityHealth( float health );
scriptEvent string getGuiParm(float guiNum, string key);
scriptEvent float getGuiParmFloat(float guiNum, string key);
scriptEvent void guiNamedEvent(float guiNum, string event);
scriptEvent entity fireProjectile( string projDefName , vector firePos, vector fireAng );
scriptEvent entity fireProjAtTarget( string projDefName , vector firePos, entity aimAtEnt );
scriptEvent entity getClosestTargetTypePrefix( string typePrefix, string ignoreType );
scriptEvent entity getRandomTargetTypePrefix( string typePrefix, string ignoreType );
------------------------------------------------
System events (called via 'sys.')
------------------------------------------------
scriptEvent float getShaderVolume( string sound );
scriptEvent vector rotateVector( vector vec, vector ang );
------------------------------------------------
Animated entities
------------------------------------------------
scriptEvent entity fireProjectileFromJoint( string projDefName, float jointnum, vector fireAng );
scriptEvent entity fireProjAtTargetFromJoint( string projDefName, float jointnum, entity aimAtEnt );
------------------------------------------------
players
------------------------------------------------
scriptEvent void setArmor(float newArmor);
scriptEvent float getArmor();
scriptEvent void addProjectilesFired(float num);
scriptEvent void addProjectileHits(float num);
scriptEvent void setAnimMoveOn();
scriptEvent void setAnimMoveOff();
scriptEvent void setGravityInAnimMove(float mult);
scriptEvent void forceHighPain(float mode); //-1 disabled, 0 allowed, 1 forced
scriptEvent void forceUpdateNpcStatus();
scriptEvent void startKick(string meleeDefName, float dmgMult);
scriptEvent void stopKick();
------------------------------------------------
Weapons
------------------------------------------------
scriptEvent void startAutoMelee( float dmgMult );
scriptEvent void stopAutoMelee();
scriptEvent void setWeaponMode( float value );
scriptEvent float getWeaponMode();
scriptEvent void launchProjectiles( float num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower, float projtype ); //projtype added
scriptEvent entity createProjectile( float projtype ); //projtype added
------------------------------------------------
idAI
------------------------------------------------
scriptEvent void moveToPositionDirect( vector pos );
scriptEvent void avoidObstacles( float avoid );
scriptEvent void triggerFX( string joint, string fx );
scriptEvent entity startEmitter( string name, string joint, string particle );
scriptEvent entity getEmitter( string name );
scriptEvent void stopEmitter( string name );
------------------------------------------------
idAI_Bot
------------------------------------------------
scriptEvent float selectBotWeapon( float weaponNum );
scriptEvent float selectAnotherWeapon( float idealLevel, float minLevel );
scriptEvent float getCurrentBotWeapon();
scriptEvent float getBotWeaponNumByName( string weaponName );
scriptEvent entity fireWeapon();
scriptEvent void reloadWeapon();
scriptEvent float checkReloadTolerance();
scriptEvent float getAmmoInClip();
scriptEvent float getClipSize();
scriptEvent string getIdleAnim();
scriptEvent string getReloadAnim();
scriptEvent string getFireAnim();
scriptEvent float canHitEnemyFromCurrentWeapon();
scriptEvent float canFireToEnemyNoSelfDamage(float requireVisible);
scriptEvent float canHitEnemyFromFireAnim(float weaponToTest);
scriptEvent float lostTimeMoreThan(float time);
scriptEvent float weaponChangedMoreThan(float time);
scriptEvent void playAnimOnWeapon( string animname );
scriptEvent float tryLockNode(entity node);
scriptEvent void releaseCurrentNode();
scriptEvent entity findEnemyAIorPL( float onlyInFov );
------------------------------------------------
idBotNode
------------------------------------------------
scriptEvent float evaluateConditions();
scriptEvent entity getNextUsableNode( entity botEntity );
scriptEvent float canBeUsedBy( entity botEntity );
scriptEvent void reached();
/***********************************************************************
New Global Script Functions
***********************************************************************/
void start_music(entity m_speaker);
void set_fadeout_time(float new_fadeout_time); //no need to use this
void stop_music();
/***********************************************************************
New Player Script Functions meant to be called by player animations
***********************************************************************/
void enableGravityInAnimMoveX1();
void enableGravityInAnimMoveX05();
void disableGravityInAnimMoveAny();
/***********************************************************************
New Keys
***********************************************************************/
------------------------------------------------
Entity type -> "New_Key" "default"
------------------------------------------------
damage def -> "check_headshot" "0"
damage def -> "damageSpirits" "0"
damage def -> "melee" "0"
damage def -> "ignore_friends" "0" //ignore player team (0)
damage def -> "playerDamageScale" "1"
actor -> "headshot_disabled" "0"
actor -> "highpain_threshold zonename" "0"
actor -> "highpain_resettime zonename" "0"
AI -> "staticDeath" "0" //for Icon Of Sin
weapon -> "melee_tracerWidth" "0"
weapon -> "firingWalkSpeedMult" "1"
projectile -> "isArrow" "0"
projectile -> "getHitEntity" "0" //for Icon Of Sin's fireball
damage def (kicks) -> "kick_tracerWidth" "1"
damage def (kicks) -> "kick_distance" "0"
damage def (kicks) -> "from_joint" ""
damage def (kicks) -> "to_joint" ""
/***********************************************************************
New Framecommands
***********************************************************************/
------------------------------------------------
idAI_Bot
------------------------------------------------
fire_weapon
------------------------------------------------
player
------------------------------------------------
comboForceHighPain
comboAllowHighPain
comboDenyHighPain
startAutoMelee [interger_positive_value]
stopAutoMelee
startKick [damage_name] [interger_positive_value]
stopKick
weapon_call [function_name]
/***********************************************************************
What we can do from player anims - quick overview and examples
***********************************************************************/
//-- gravity --
//note1: gravity is already set in player script when the combo is called
//note2: no need to reset it back to 1 at the end of the anim
frame 1 object_call disableGravityInAnimMoveAny //disable gravity
frame 1 object_call enableGravityInAnimMoveX05 //gravity 0.5
frame 1 object_call enableGravityInAnimMoveX1 //default gravity
//-- force high pain --
//note1: default is allow (like standard attacks)
//note2: no need to reset it back to allow at the end of the anim
frame 1 comboForceHighPain
frame 1 comboAllowHighPain
frame 1 comboDenyHighPain
//-- start/stop attacks --
//note1: damage multiplier is a positive integer number
//note2: you can start it many times in the same anim
frame 1 startAutoMelee 1
frame 1 startAutoMelee 100 //any positive integer number!
frame 1 stopAutoMelee
//-- start/stop kicks --
//note1: damage multiplier is a positive integer number
//note2: you can start it many times in the same anim
//note3: you can use different def_damage in the same anim
frame 1 startKick damage_rightPunch 1
frame 1 startKick damage_leftPunch 100 //any positive integer number!
frame 1 stopKick
//-- weapons utilites --
frame 1 weapon_call fromPlayerAnimTest //call the "fromPlayerAnimTest" function on weapon scriptobject
/***********************************************************************
New Cvars
***********************************************************************/
------------------------------------------------
Cvar name -> Description
------------------------------------------------
s_music_volume -> In-game music volume. (-10 = disabled )
ruiner_bind_run_once -> Rebind all controls once for Ruiner.
/***********************************************************************
MALEDICT SCRIPT FUNCTIONS, call with .callFunction("f_name");
***********************************************************************/
------------------------------------------------
FLYING MALEDICT
------------------------------------------------
void enable_phases();
void disable_phases();
void enable_attack_bigasteroid();
void disable_attack_bigasteroid();
void request_landing();
void request_teleport_closer();
void request_teleport_spec_entity();
void enable_waiting();
void disable_waiting();
------------------------------------------------
WALKING MALEDICT
------------------------------------------------
void enable_phases();
void disable_phases();
void enable_attack_multiast();
void disable_attack_multiast();
void request_attack_multiast();
void request_takeoff();