Upsidedown Tentacle Challenge

Discussions about Coding and Scripting
User avatar
UnrealGGecko
Godlike
Posts: 2900
Joined: Wed Feb 01, 2012 11:26 am
Personal rank: GEx the Gecko
Location: Kaunas, Lithuania
Contact:

Re: Upsidedown Tentacle Challenge

Post by UnrealGGecko »

*GASP* how DARE you?? :tongue:

I really wanna try this out, would be cool to put them on the ground or on the side of a pillar and make them shoot at players from there. Looking forward to it :wink:
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Upsidedown Tentacle Challenge

Post by MrLoathsome »

See attached.

Review the Readme.txt file before testing.

It is a rough draft that also contains questions regarding details for you lot.

This is what will be used as a base class, when I get back to the flying version.
Put that on hold to iron out the details regarding just getting them to be upside down.
(Jack was right. This was NOT easy. Thanks Obama ! :tongue: :wtf: )

If it looks to be working right, could also be used as base for the Barnacle thing Jack mentioned.
And if we get some skins that fit the Tentacle model, who knows what else? VenusFlyTent?
Attack vegetables?

If you test it out, let me know what you think.

Edit: It should work with UT/U1/227 and online.

Edit2: Denied ? I think not. :satan:
Attachments
UTent_Beta1.zip
Upside Down Tentacle. Beta1
(15.25 KiB) Downloaded 64 times
blarg
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Upsidedown Tentacle Challenge

Post by papercoffee »

MrLoathsome wrote:I am double-posting and necro-bumping this thread so you can all read
my cool edit to the above post.

Sadly I will now be banned for breaking the forum rules, so none of you
will ever get to see the cool Tentacles I have been working on. :loool: :mrgreen:
Damn ...where is my Ban-Hammer !!? ...Oh ...I mothballed it... never mind.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Upsidedown Tentacle Challenge

Post by MrLoathsome »

Update for anybody who might be testing this. (If anybody is.... :roll: )

Minor issue noticed in online play. Tents were sliding about a bit when shot.
Only simulated function in the default Tentacle code is AddVelocity.
Where could the problem be? :idea!: :idea: :idea!:
That has been fixed.

Still hunting for the best way to fix issue regarding them spawning in normal tent
orientation if they happen to spawn facing a player.
Turns out this is not a bug with SwarmSpawner. Seen it happen when adding them with MonsterSpawn also yesterday.
Never happens when using Summon to add them, as they always spawn facing away from the player with that method.
(Which is probably the answer to my little problem. Will look at that next.... 8) )

Want to avoid screwing around with SeePlayer, SetEnemy or the Startup state code if at all possible.

Let me know if you see anything other than those 2 issues wrong with the Beta1 release.

(The Idea! smiley is broken.....)
blarg
User avatar
editor Dave
Inhuman
Posts: 904
Joined: Mon Mar 10, 2008 6:40 pm
Personal rank: Passionate SP Mapper
Location: Germany/Bavaria
Contact:

Re: Upsidedown Tentacle Challenge

Post by editor Dave »

I'm happy this is working after all, nice work so far! I didn't know Tentacles could smack you with their tail :o

I only tested it by placing them in a map playing Singleplayer and I noticed one thing concerning gameplay:
When you go in range of the tail attack and move around the tentacle, it won't follow you, it also won't trigger its ranged attack again if go further away. It will continue to attack you only if you are in direct sight. That means: The ranged attacks chase you in any direction because the Tent turns along with you, but in close combat it doesn't (and won't until you walk right back in its face). Is that intentional? I found this behavior a bit strange.

And one thing you are very well aware of:
The death sequence and carcass are pretty disappointing considering everything else works so perfect (even the spawn animation!). Do you think you can turn it around the moment the dying state is activated, so the original death sequence is able to work correctly? Or maybe you can make the spawn animation go backwards. But that is not possible to do, is it?
Image
10-Year Anniversary on Jun 08, 2019.
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Upsidedown Tentacle Challenge

Post by papercoffee »

MrLoathsome wrote:Update for anybody who might be testing this. (If anybody is.... :roll: )
:what: I'm not that much of a single player... otherwise I would have tested the hell out of it. :sad2: really.
MrLoathsome wrote:(The Idea! smiley is broken.....)
Oh indeed ...it is.

SHADE!?!!??
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Upsidedown Tentacle Challenge

Post by MrLoathsome »

editor Dave wrote:I'm happy this is working after all, nice work so far! I didn't know Tentacles could smack you with their tail :o

I only tested it by placing them in a map playing Singleplayer and I noticed one thing concerning gameplay:
When you go in range of the tail attack and move around the tentacle, it won't follow you, it also won't trigger its ranged attack again if go further away. It will continue to attack you only if you are in direct sight. That means: The ranged attacks chase you in any direction because the Tent turns along with you, but in close combat it doesn't (and won't until you walk right back in its face). Is that intentional? I found this behavior a bit strange.

And one thing you are very well aware of:
The death sequence and carcass are pretty disappointing considering everything else works so perfect (even the spawn animation!). Do you think you can turn it around the moment the dying state is activated, so the original death sequence is able to work correctly? Or maybe you can make the spawn animation go backwards. But that is not possible to do, is it?
Got the issues in Beta1 I mentioned all fixed now I believe.
Regarding that issue you mentioned where they follow while in RangedAttack, but not in MeleeAttack.
Unless I screwed something up, all the behaviors such as this should be exactly what the default Tentacles do.
Will be doing more testing, and may modify that a bit.

Other than getting them to work upside down and attempting to fix the MeleeAttack, I have been trying hard
not to modify them from defaults. (So far...)

Looking at that death sequence currently. Have it using the default animation at the moment, but
the flip is sort of abrupt. TweenAnim isn't going to help me with that I don't think, so I may have to do something
different. Got a couple of ideas to test out.
I will also look at seeing if running the spawn animation backwards will work. Pretty sure that is actually possible, but
would need something at the end so players can tell a dead Tent from a Live one.

Have a question on something that you may be able to answer.

Do mappers ever actually use the Orders variable when placing Monsters in maps?
(Guarding, Patrolling, Attacking, Ambushing etc.)
If they do, I may have to tweak more functions/states for that. (Or just nuke it if set...)
Seems to me those orders are pointless for a stationary pawn such as this.
They are always Guarding or Attacking by default anyway....

@papercoffee

That's no excuse.
I included ini files for both MonsterSpawn303 and SwarmSpawner, so you could test these
in any type of game or botmatch.

Should have a Beta2 out soon.
blarg
User avatar
editor Dave
Inhuman
Posts: 904
Joined: Mon Mar 10, 2008 6:40 pm
Personal rank: Passionate SP Mapper
Location: Germany/Bavaria
Contact:

Re: Upsidedown Tentacle Challenge

Post by editor Dave »

Hm, on air it might make sense since it's rare you can really get that close to a Tentacle (if at all), but you are literally stroking it and it doesn't notice you? This thing must have no sense of touch! :lol:
MrLoathsome wrote: Looking at that death sequence currently.
While looking strange, sequence itself doesn't disappoint as much as the dead carcass. This just looks like a boner to me :loool:
MrLoathsome wrote: Do mappers ever actually use the Orders variable when placing Monsters in maps?
(Guarding, Patrolling, Attacking, Ambushing etc.)
Patrolling is an often used feature. The others might be put in maps, too, but they are less obvious. However, as you said, you don't need to worry about those if you have a stationary pawn like this, anyway.
Image
10-Year Anniversary on Jun 08, 2019.
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Upsidedown Tentacle Challenge

Post by papercoffee »

editor Dave wrote:
MrLoathsome wrote: Do mappers ever actually use the Orders variable when placing Monsters in maps?
(Guarding, Patrolling, Attacking, Ambushing etc.)
Patrolling is an often used feature. The others might be put in maps, too, but they are less obvious. However, as you said, you don't need to worry about those if you have a stationary pawn like this, anyway.
But it can fly now...
MrLoathsome wrote:@papercoffee
That's no excuse.
I included ini files for both MonsterSpawn303 and SwarmSpawner, so you could test these
in any type of game or botmatch.
No excuse, but a reason...
I don't play with monsters in regular UT matches ...but I should try it. Maybe I like it.
Some very huge CTF maps could fit for those mods.
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Upsidedown Tentacle Challenge

Post by Dr.Flay »

Paper there is a wider range of creatures that can be chosen to suit a map style.
Creavion used snakes and scorpions to good effect in his Antalius map.
I use them with some of the spiders in the Asgard spinner mod in the places they would belong.
I use cockroaches, rats, rabbits, dogs, cows, and elephants in suitable maps, and almost always add birds.
They are always set to threaten you but only attack when triggered.

In UT we get to compete on alien worlds, so it would seem suitable that sometimes the wildlife/plant-life can get annoyed at you.
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Upsidedown Tentacle Challenge

Post by papercoffee »

I thought, you use only zombies :ironic:
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Upsidedown Tentacle Challenge

Post by MrLoathsome »

*Since I made this post in the Coding/Scripting section, I shall continue my blogish monologue regarding what steps I have
been taking to meet this challenge.

Demo1 contains a LOT of brute force techniques, as well as including a bit of code that will never
happen for these. Any functions/states it had that were not in the default Tentacle.uc code, were taken directly
from either ScriptedPawn, Pawn or Actor, and then only modified the min. amount to force the upside down thing to happen.
It is a bit ugly compared to current dev. version.

Since then I have narrowed down exactly which native functions were screwing around with the Rotation, and where they are
being called. (Mostly... :what: )

In addition to tracking down and adjusting places in the default code where Rotation was being reset, any call to
function SetPhysics was fouling up Rotation as far as either Pitch or Roll were concerned. Unless it was being set to PHYS_None. :wtf:
(I never once in testing ever seen Roll be anything but zero. The default Tentacles are 2D. :noidea )

More perplexing is what was happening with native function LineOfSightTo.
Consider this statement right out of state Attacking in the default Tentacle code:

Code: Select all

		if (!LineOfSightTo(Enemy))
			GotoState('StakeOut');
		else
			GotoState('RangedAttack');
No changes to Physics or Rotation if LineOfSightTo was false and it went to state StakeOut.
But, if LineOfSightTo was true, not only did rotation get clobbered, but Physics would get
set to PHYS_Walking. No idea why. :omfg: :noidea
bCanWalk is FALSE for default Tentacles.....

Got all that fixed I think. (Still testing.... :barf: )

But bCanSwim is True in the default Tentacle code. :idea:

The UTents in the next demo will be able to swim if they are in the water.
They will be more "Tentacley" than the default tents when I get done.
And will be upside down when I want them to be. :pfff:

Note the current version will NOT be flying. They will be upside down Tentacles, with the
Melee Attack fixed, and swimming enabled when I am finished. (I don't think Epic quite finished them right....)

The flying version will be a separate project I will look at once these are done.

@The Mods. Spellcheck is having an issue with "blogish" and "Tentacley". Look into it. :mrgreen: :tongue:
blarg
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Upsidedown Tentacle Challenge

Post by sektor2111 »

Reminders if these are child Tentacles
PeripheralVision is pretty crappy with default -2.0 which is a whatever angle bla bla crap, someone needs more maths.
HearingThreshold = 10 - wheew - I don't know how works this value but for sure other creatures have different setup far from this dumbness.
Tentacle was first creature discarded from relevance in first versions of MH2 + Some Pteradactyl (and maybe others from Jurrasik package) because these pawns are trash by default - even if bNoMonsters=False (it doesn't help engine in handling trash). I won't try to recreate what I could see in one B..B... Bridge map with an awesome Tentacle when it got a strong hit from a "weapon" made far away overseas...

Now My turn to be little dumb with these "defaults".
I was trying to help some battle code when Tentacles were still firing at unexistent enemy doing tweaks in timers (also resetting those default abnormal values) and loading controllers more, really stupid way trying to fix monster by pushing. Somehow works but controllers performance goes down even if games looks very functional. More tweaking - more slowdowns and more sudden things out of timing will show up = more to fix...
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Upsidedown Tentacle Challenge

Post by Dr.Flay »

papercoffee wrote:I thought, you use only zombies :ironic:
Ah, all those examples above are manually added for background life, and the Zombies!!! mutator is extra to that.
An Elephant will stomp the zombies for a while until finally it becomes surrounded.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Upsidedown Tentacle Challenge

Post by MrLoathsome »

These should be upside down Tentacles.
Other than the slight adjustments I made to Health and MeleeRange, all other settings are at default.
Any value you could adjust for a default Tentacle, you should be able to adjust for these.

*Note default tentacles are huge. I suggest you scale these down a bit for most uses....
In testing, the main thing you may want to adjust other than scale would be SightRadius.
This setting has an obvious effect as far as how close you can get to them before they wake up.

These swim as well as default Tentacles, (which is not very good, sorta like ducks...), but fight better in the
water as they have the MeleeAttack,

I don't think I added any unnecessary "tweaks in timers", or resetted any "default abnormal values", or loaded any more
"stupid pushing controllers" here....

I have seen what you speak of in various 3rd party projects I have fixed before. Linked lists and stacks that do nothing.
Complicated craps and convoluted functions that achieve nothing that a few good tweaks in the correct spot couldn't do.

This has nothing extra like that.

This is Epic source just tweaked a bit, so that they work upside down, and the MeleeAttack is fixed. (I think....)
I added a few missing sanity checks along the way, but tried very hard not to mess with Epics stuff unless it was
obviously broken. (So if you have any problems with it, blame Epic. :mrgreen: :lol2: :what: )


This Beta3 has 3 different death animations. (Chosen randomly...)

One minor bug I am aware of ATM. Due to my messing with the Physics.
If a UTent Carcass lands in the water, it will bounce for a while. It is sorta cool.... :rock:
(That's not a bug. Its a "Feature". Yeah. That's the ticket. :satan: )

See attached. Waiting for feedback.

*Edit:
Well I did hijack SetMovementPhysics, and AddVelocity, and states Waiting, RangedAttack and MeleeAttack, but other than
that, just minor tweaks. 8)

**Edit 2:
Tested with UT v4.36 on an offline, stock install and with and without all my nifty mutators. (Server was running UTPG 4.40, because I am cool like that. :roll: )
Tested offline with Unreal Gold patched whatever slightly stale version of 227 I have on there.
This should work with everything. Let me know if it doesn't.
Attachments
UTent_Beta3.zip
UTent_Beta3 - Upside down Tentacle
(13.23 KiB) Downloaded 66 times
blarg
Post Reply