Jump to content
The Dark Mod Forums

Belcher Creature (wip)


ascottk

Recommended Posts

  • Replies 105
  • Created
  • Last Reply

Top Posters In This Topic

LOL! That looks great! :) Can the AI actually ride or would they fall off? What happens if you put an AI on a belcher like this and let it run?

I believe they fall off. For the player at least, the code actively pushes them off in some random direction if they're standing on an AI. Not sure what happens for AI on AI, but the physics is two boxes that always stay upright, so it would either not look good or fall off. We could always turn that off with a spawnarg so you can run along some huge elephant AI or something. Not a huge demand for that right now. :)

 

D3 does have vehicles... and the vehicles are animated and IK'd similar to the AI, so it's theoretically possible to adapt an animated Belcher into a vehicle. I'll start training up my mounted archery now. :) (I'm not crazy enough to start working on this now though, that's not a 1.0 feature for sure).

Link to comment
Share on other sites

For the player at least, the code actively pushes them off in some random direction if they're standing on an AI.

Ah... so that's why it goes crazy when you try to mantle onto a guard. :P

 

D3 does have vehicles... and the vehicles are animated and IK'd similar to the AI, so it's theoretically possible to adapt an animated Belcher into a vehicle.

:o:wub::ph34r:

 

(I'm not crazy enough to start working on this now though, that's not a 1.0 feature for sure).

Quite right. As soon as 1.0 is out, though... ;)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Ascottk, do you mind if we rename the entityDefs for these guys to monster_belcher_cave and monster_blecher_swamp? That might be more descriptive for mappers than the current names.

Link to comment
Share on other sites

Ascottk, do you mind if we rename the entityDefs for these guys to monster_belcher_cave and monster_blecher_swamp? That might be more descriptive for mappers than the current names.
I don't mind since the "salamander" mucker doesn't look like a salamander anymore :laugh:
Link to comment
Share on other sites

One other thing--do you have a copy of the normalmap with just the mesh geometry on it? I'm working on some varient skins, and while I could try removing the 'scales' from the normalmap without wrecking the curves of the geometry, it would take a whole lot of painstaking effort. :)

Link to comment
Share on other sites

One other thing--do you have a copy of the normalmap with just the mesh geometry on it? I'm working on some varient skins, and while I could try removing the 'scales' from the normalmap without wrecking the curves of the geometry, it would take a whole lot of painstaking effort. :)
Sure: http://208.49.149.118/TheDarkMod/models/as..._body_local.tga
Link to comment
Share on other sites

More changes to the def file & added a few more animations (melee: biting & hitting with tail) & they blink. I also made a new entityDef for aas (because these guys are longer than they are tall):

// for AI longer than they are tall or wide (belchers)
entityDef aas128 {
"mins"						"-128 -16 0"		  // changed
"maxs"						"128 16 82"		  // changed
"usePatches"				"0"						  
"writeBrushMap"				"0"
"playerFlood"				"0"
"allowSwimReachabilities"	"0"
"allowFlyReachabilities"	"1"
"fileExtension"				"aas32"					// changed
"gravity"					"0 0 -1050"
"maxStepHeight"				"18"
"maxBarrierHeight"			"32"
"maxWaterJumpHeight"		"20"
"maxFallHeight"				"64"
"minFloorCos"				"0.6999999881"
"tt_barrierJump"			"100"
"tt_startCrouching"			"100"
"tt_waterJump"				"100"
"tt_startWalkOffLedge"		"100"
}

Link to comment
Share on other sites

Cool! Have you tried out the AAS file in practice?

 

I was wondering about whether it would work, since the AAS compiler doesn't know which way the AI will be facing when it gets to each point, and seems to tile in a grid parallel to world coordinates, will a bounding box that's not square in XY work for AAS? Or will it just take the largest dimension of the bounding box?

 

For example, if there were a doorway that was wide enough for them to go thru forward but not sideways, and you compile an AAS for it, will they go thru?

 

Also, we might as well call it AAS belcher or .blc or something so there's no confusion about what AI it's for.

Link to comment
Share on other sites

Cool! Have you tried out the AAS file in practice?
Yeah, I did this because their heads & tails clipped through walls. Now they clip less.

 

I was wondering about whether it would work, since the AAS compiler doesn't know which way the AI will be facing when it gets to each point, and seems to tile in a grid parallel to world coordinates, will a bounding box that's not square in XY work for AAS? Or will it just take the largest dimension of the bounding box?

 

For example, if there were a doorway that was wide enough for them to go thru forward but not sideways, and you compile an AAS for it, will they go thru?

I don't know so it's a good thing to test out. I'll make a test map with mixed AI.

 

Also, we might as well call it AAS belcher or .blc or something so there's no confusion about what AI it's for.
I realized before I went to bed that I didn't change:

"fileExtension"				"aas32"

to something more appropriate. It might conflict with the rest of the AI. So I'll change the entityDef name to aasBelcher & maybe change the extension to .blc.

Link to comment
Share on other sites

Wouldn't it be better to keep "aas" in the file extension, just so it's clear what it is? So ".aasbelcher" or ".aasblc".

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

:laugh:

 

"aasbelcher" then. :)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Ooo, baby dragon. ;)

 

That's pretty cool. :) What's the green missile that comes from off-screen? That one could almost work as a gas projectile as is.

Link to comment
Share on other sites

Ooo, baby dragon. ;)

 

That's pretty cool. :) What's the green missile that comes from off-screen? That one could almost work as a gas projectile as is.

That's the belcher gas I was working on. I figure the gas will be a slow projectile with the "def_damage" "damage_noair" pair. We'll see how that goes. Also we'll see if I remember all the files to commit too :laugh: Let's see:

 

Modified belcher def file, belcher_gas.prt, ai_darkmod_monster_belcher.script with modified darkmod_include.script, and all of the new animations.

Link to comment
Share on other sites

Okay, the latest revision are (hopefully) up. Here's a vid of the belcher gas:

http://208.49.149.118/TheDarkMod/models/as...belcher_gas.avi

 

There's some problems though & it might be the script. They stand around and their whole body pivots around looking at the player & you have to get close to them in order to attack. If they're close, they'll try to bite & I don't think the leap attack is utilized anymore. The gas belching is too frequent & I may have to lengthen that animation to have some time between attacks.

 

EDIT: Oh yeah, the screen still shakes when they roar. It's kind of annoying <_<

EDIT2: The range attack is actually a short distance but if you're still in sight and far away, he'll keep belching at you. It has something to do with this part of the script:

	if ( AI_ENEMY_IN_FOV ) {
	if ( currentTime >= nextRoar ) {
		attack_flags |= ATTACK_MISSILE;
	}
}
if ( !canReachEnemy() || ( currentTime >= nextAttack ) ) {
		range_attack_anim = chooseAnim( ANIMCHANNEL_LEGS, "turret_attack" );
		if ( canHitEnemyFromAnim( range_attack_anim ) ) {
			attack_flags |= ATTACK_MISSILE;
		}

		anim = chooseAnim( ANIMCHANNEL_LEGS, "range_attack" );
		if ( testAnimMoveTowardEnemy( anim ) ) {
			if ( canHitEnemyFromAnim( anim ) ) {
				range_attack_anim = anim;
				attack_flags |= ATTACK_MISSILE;
			}
		}
	}

I'd like it to more like this one:

if ( ( ( sys.getTime() > nextNoFOVAttack ) && AI_ENEMY_VISIBLE ) || AI_ENEMY_IN_FOV ) {
	range = enemyRange();
	if ( ( range >= BELCHER_LEAP_RANGE_MIN ) && ( range < BELCHER_LEAP_RANGE_MAX ) && ( currentTime >= nextLeap ) ) {
		if ( canHitEnemy() ) {
			t = animLength( ANIMCHANNEL_TORSO, "jump_start" );
			jumpTarget = predictEnemyPos( t );
			jumpVelocity = getJumpVelocity( jumpTarget, BELCHER_LEAP_SPEED, BELCHER_LEAP_MAXHEIGHT );
			if ( jumpVelocity != '0 0 0' ) {
				attack_flags |= ATTACK_LEAP;
			} else {
				// check if we can leap again in 2 seconds
				nextLeap = DelayTime( 2 );
			}
		}
	}
}

So how could we utilize the leap attack & the ranged belch? If I understand the script correctly, the belcher will only do the leap attack if the range is greater than or equal to the minimum distance & less than the maximum distance which is defined at the top of the script:

#define BELCHER_LEAP_RANGE_MIN	150
#define BELCHER_LEAP_RANGE_MAX	400

& the ranged belch attack will only happen if the player's out of melee range & still in the belcher's line of sight.

Link to comment
Share on other sites

Looks like you need an extra range check in the top snippet of code you posted. Maybe something like:

 

range = enemyRange();
if ( ( range >= BELCHER_BELCH_RANGE_MIN ) && ( range < BELCHER_BELCH_RANGE_MAX ) ) {
	// ... top snippet of code goes here
}

 

and of course you have to define BELCHER_BELCH_RANGE_MIN and BELCHER_BELCH_RANGE_MAX.

 

You said you made your own AI script... does it inherit from ai_darkmod_base? I would think it needs to, otherwise it won't be able to search etc.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Looks like you need an extra range check in the top snippet of code you posted. Maybe something like:

 

range = enemyRange();
if ( ( range >= BELCHER_BELCH_RANGE_MIN ) && ( range < BELCHER_BELCH_RANGE_MAX ) ) {
	// ... top snippet of code goes here
}

 

and of course you have to define BELCHER_BELCH_RANGE_MIN and BELCHER_BELCH_RANGE_MAX.

 

You said you made your own AI script... does it inherit from ai_darkmod_base? I would think it needs to, otherwise it won't be able to search etc.

Whoohoo! I just tried it (without looking at your post first, the gods must be crazy :wacko: ). Great minds think alike ;) Anyway, we have the same definition BELCHER_BELCH_RANGE :laugh:

#define BELCHER_ROAR_RATE			5
#define BELCHER_DODGE_RATE		5
#define BELCHER_ATTACK_RATE		1
#define BELCHER_LEAP_RATE		7
#define BELCHER_LEAP_SPEED		550
#define BELCHER_LEAP_MAXHEIGHT	48
#define BELCHER_LEAP_RANGE_MIN	225
#define BELCHER_LEAP_RANGE_MAX	400
#define BELCHER_BELCH_RANGE_MIN	100
#define BELCHER_BELCH_RANGE_MAX	224
#define BELCHER_NOFOVTIME		6

It does inherit from ai_darkmod_base:

object monster_belcher : ai_darkmod_base {

& here's the changed part:

	if ( ( range >= BELCHER_BELCH_RANGE_MIN ) && ( range < BELCHER_BELCH_RANGE_MAX ) && ( currentTime >= nextLeap ) ) {
	if ( currentTime >= nextRoar ) {
		attack_flags |= ATTACK_MISSILE;
	}
}
if ( !canReachEnemy() || ( currentTime >= nextAttack ) ) {
		range_attack_anim = chooseAnim( ANIMCHANNEL_LEGS, "turret_attack" );
		if ( canHitEnemyFromAnim( range_attack_anim ) ) {
			attack_flags |= ATTACK_MISSILE;
		}

		anim = chooseAnim( ANIMCHANNEL_LEGS, "range_attack" );
		if ( testAnimMoveTowardEnemy( anim ) ) {
			if ( ( range >= BELCHER_BELCH_RANGE_MIN ) && ( range < BELCHER_BELCH_RANGE_MAX ) && ( currentTime >= nextLeap ) ) {
				range_attack_anim = anim;
				attack_flags |= ATTACK_MISSILE;
			}
		}
	}

The leaping attack's too long so such lumbering looking creatures. One leap-attacked me from across the room! There's tweaking to be done but it works B)

Link to comment
Share on other sites

Ah OK, I've downloaded it now and I see you've done the inheritance thing properly. Good. :)

 

Overriding all the animations and state_Begin probably wasn't necessary (and may cause breakage when new AI system is in place), but I'm not going to nitpick.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Ah OK, I've downloaded it now and I see you've done the inheritance thing properly. Good. :)

 

Overriding all the animations and state_Begin probably wasn't necessary (and may cause breakage when new AI system is in place), but I'm not going to nitpick.

I just copied, pasted, then customized d3's ai_monster_demon_pinky.script & ai_monster_demon_imp.script. I just kept looking for features I wanted for the belchers. I want to fix that though.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 0 replies
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 4 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
×
×
  • Create New...