.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Enhancement Workshop > Metamod and metamod plugins
Metamod and metamod plugins Plugins and improvements for the metamod server-side mod

Reply
 
Thread Tools
Help a newbie coder
Old
  (#1)
Akalamanaia
Guest
 
Status:
Posts: n/a
Default Help a newbie coder - 01-08-2004

Hi, im trying to code a new monster for Monster mod metamod plugin, to be exact the replicators from Stargate SG-1 TV Show. Now can enybody help me cause im kind of stuck, i took bits & pieces from other monsters and trying to figure if im right, please tell me if this code is...lets say "Working"

//================================================== =======
// Replicator
//================================================== =======

#include "extdll.h"
#include "util.h"
#include "cmbase.h"
#include "cmbasemonster.h"
#include "monsters.h"
#include "schedule.h"

//================================================== =======
// monster-specific DEFINE's
//================================================== =======
#define REPLICATOR_MAXIMUM_REPLICATE 50 // We Definately Do Not Want Massive Lag Cause Of Thousands of Replicator Entities in the map.


//================================================== =======
// monster-specific schedule types
//================================================== =======
enum
{
SCHED_FIND_WEAPON = LAST_COMMON_SCHEDULE + 1,
SCHED_RETURN_TO_NEST,//Schedule The Return to "Nest"
SCHED_CONSUME_WEAPON,//Consumes The Weapon For to use as raw materials for making more of itself
SCHED_REPLICATE,//Simply said, Replicate itself

};

//================================================== =======
// monster-specific tasks
//================================================== =======

enum
{
TASK_REPLICATOR_TAKE_WEAPON = LAST_COMMON_TASK + 1, // Taking a weapon
TASK_REPLICATOR_RETURN_TO_NEST ,// Returning the Weapon to the "Nest"
TASK_REPLICATOR_CONSUME_WEAPON,//Now we shall consume the weapon
TASK_REPLICATOR_REPLICATE,//What about we make more of ourselves so we don't become extinct like dinosaurs?

};

//================================================== =======
// Monster's Anim Events Go Here
//================================================== =======
#define REPLICATOR_AE_ATTACK_ONE 0x01

const char *CMReplicator::pAttackHitSounds[] =
{
"replicator/attack_hit_1.wav",
"replicator/attack_hit_2.wav",
"replicator/attack_hit_3.wav",
};

const char *CMReplicator::pAttackMissSounds[] =
{
"replicator/miss1.wav",
"replicator/miss2.wav",
};

const char *CMReplicator::pAttackSounds[] =
{
"replicator/attack1.wav",
"replicator/attack2.wav",
};

const char *CMReplicator::pIdleSounds[] =
{
"replicator/repli_idle1.wav",
"replicator/repli_idle4.wav",
};

const char *CMReplicator::pAlertSounds[] =
{
"replicator/repli_alert1.wav",
};

//================================================== =======
// Classify - indicates this monster's place in the
// relationship table.
//================================================== =======
int CMReplicator :: Classify ( void )
{
return CLASS_REPLICATOR_MONSTER;
}

//================================================== =======
// hide from the loudest sound source
//================================================== =======
Task_t tlReplicatorTakeCoverFromBestSound[] =
{
{ TASK_STOP_MOVING, (float)0 },
{ TASK_FIND_COVER_FROM_BEST_SOUND, (float)0 },
{ TASK_RUN_PATH, (float)0 },
{ TASK_WAIT_FOR_MOVEMENT, (float)0 },
{ TASK_REMEMBER, (float)bits_MEMORY_INCOVER },
{ TASK_TURN_LEFT, (float)179 },
};

Schedule_t slReplicatorTakeCoverFromBestSound[] =
{
{
tlReplicatorTakeCoverFromBestSound,
ARRAYSIZE ( tlReplicatorTakeCoverFromBestSound ),
bits_COND_NEW_ENEMY,
0,
"ReplicatorTakeCoverFromBestSound"
},
};

//================================================== =======
// AlertIdle Schedules
//================================================== =======
Task_t tlReplicatorHide[] =
{
{ TASK_STOP_MOVING, 0 },
{ TASK_SET_ACTIVITY, (float)ACT_IDLE },
{ TASK_WAIT, (float)2 },
{ TASK_SET_SCHEDULE, (float)SCHED_CHASE_ENEMY },
};

Schedule_t slReplicatorHide[] =
{
{
tlReplicatorHide,
ARRAYSIZE ( tlAssassinHide ),
bits_COND_NEW_ENEMY |
bits_COND_SEE_ENEMY |
bits_COND_SEE_FEAR |
bits_COND_LIGHT_DAMAGE |
bits_COND_HEAVY_DAMAGE |
bits_COND_PROVOKED |
bits_COND_HEAR_SOUND,
0,
"ReplicatorHide"
},
};

All i want it to do is replicate all at costs(ofcourse it has to fetch the weapons it uses for raw materials and bring back it to nest to decompose it to parts then build more of itself with the gun material it gathered)It wouldn't attack player unless it determines if its a threat(i.e one of its kind is shot upon, then they would converge upon the player and kill him). Im kind of clueless after the things i added there what to do. :'(

Btw could enyone attach code for the normal turrets and ceiling turrets from Half Life, i think i wanna try fixing em up for Monstermod usage..

Last edited by Akalamanaia; 01-08-2004 at 23:12..
  
Reply With Quote
Re: Help a newbie coder
Old
  (#2)
Akalamanaia
Guest
 
Status:
Posts: n/a
Default Re: Help a newbie coder - 02-08-2004

could somebody please, help meeeeeeeeeeeeeeee?
  
Reply With Quote
Re: Help a newbie coder
Old
  (#3)
Akalamanaia
Guest
 
Status:
Posts: n/a
Default Re: Help a newbie coder - 07-08-2004

Ah so my thread got 35 views, but no one bothers to help me?
  
Reply With Quote
Re: Help a newbie coder
Old
  (#4)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Help a newbie coder - 11-08-2004

I'm sorry I do not know anything about this stuff...
maybe someone else here can help you when they find the time to.
  
Reply With Quote
Re: Help a newbie coder
Old
  (#5)
Maleficus
Member
 
Maleficus's Avatar
 
Status: Offline
Posts: 1,054
Join Date: May 2004
Location: Planet Earth
Default Re: Help a newbie coder - 11-08-2004

Sorry - I don't know anything about the HL engine or coding for it, I'm a coder for a quake3 engine game.


Dum Spiro Spero


  
Reply With Quote
Re: Help a newbie coder
Old
  (#6)
[MoD]Cha0s C0ntr0L
Guest
 
Status:
Posts: n/a
Default Re: Help a newbie coder - 14-08-2004

ask botman (PM)
  
Reply With Quote
Re: Help a newbie coder
Old
  (#7)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Help a newbie coder - 14-08-2004

It's a bit of a big question since you want to do all this stuff and none of that code up there shows you have tried to even do it.

It seems you don't know how the tasks and schedules work in HL, do you? If you do know, then simply apply the rules. This is more of an AI question as you want a monster to do what it wants.

Perhaps you want to try out some of that stuff and tell us of any problems you are having with it (bugs etc you have) you will be more likely to receive replies from people willing to help that way. We like to solve problems but not to do work for others, sorry.. that might be just me
  
Reply With Quote
Re: Help a newbie coder
Old
  (#8)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Help a newbie coder - 15-08-2004

Start with a working simple moster (like the headcrab) and change one rule at a time until you get to the point that it behaves like you want your monster to, then swap out the sound, models, etc. for the stuff you want to use for your model.

Don't try to change everything all at once.

botman
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com