|
Post by Guggenheim on Jun 25, 2022 7:39:33 GMT -5
For some reasons, magslug DO replace slugs with Beta gladiators. But for gunners such stuff doesn't work. I've inspected the code which replaces ammo. I've got a new computer and a bit lazy to install C++ IDE, so there's a question. What does st var in g_spawn.c stands for? If I'm right, ent is an instance of edict_t to be replaced. So probably we should replace item for ent?
ent->item = ammo_magslug;
And I've noticed some boilerplate code for soldier's ammo replacement. I'm not really into C++, I'm more familiar with Java, but I think it should look like this:
if ( !strcmp(ent->classname, "monster_soldier_light") || !strcmp(ent->classname, "monster_soldier") || !strcmp(ent->classname, "monster_soldier_ss")) { //Replace ammo if any; shards won't be replaced if ( st.item && strcmp(ent->classname, "item_armor_shard", mp_monster_ammo_replace->value ) { st.item = "ammo_cells"; } }
|
|
|
Post by Guggenheim on Jun 25, 2022 7:42:27 GMT -5
And soldiers' ammo replacing well too. There's only problem with gunners. What can this be?
|
|
|
Post by Guggenheim on Jun 25, 2022 7:48:44 GMT -5
What means SF_MONSTER_SPECIAL?
|
|
|
Post by knightmare on Jun 25, 2022 11:08:30 GMT -5
The reason why it doesn't work for gunners yet is because I hadn't added code for it in the last build.
st is the spawn temp, a special struct with temporary fields for each entity used at map load. st.item is a string field (actually a char array pointer) for the name of the item, while ent->item is the pointer to an actual item that is is grabbed from the item list.
The reason why I did the ammo replacement for soldiers they way I did is because some mappers would sometimes have certain monsters drop important items when killed, possibly a key or weapon. Also, it's very common for mappers to set the wrong ammo item for soldiers, as they all use the same model, and many/most map editors don't show the correct skin.
SF_MONSTER_SPECIAL is a spawnflag added by Lazarus. It was originally used by certain monsters to enable homing rockets (obviously only the ones that fire rockets). I also recently added a use for it to gunners to use contact grenades.
|
|
|
Post by Guggenheim on Jun 25, 2022 11:28:13 GMT -5
That's interesting. Wanna try to implement my own stuff. Is VS2008 suitable to build DLL? Is there some tutorials?
|
|
|
Post by knightmare on Jun 25, 2022 13:29:50 GMT -5
VS2008 is what I use currently for KMQ2, though I also maintain projects for VS2005 and VC6. The game DLL sources in my repo already have VS2008 projects, so you can just open the included _2008.sln file.
You will need the full version to to compile 64-bit builds- the express edition can't do that.
|
|
|
Post by Guggenheim on Jun 27, 2022 19:07:01 GMT -5
I found a bug. Just try attacking Sentien from Zaero with ETF rifle, he would play pain animation constantly so you can easily take down Sentiens with ETF rifle. I can record video tomorrow.
|
|
|
Post by Guggenheim on Jun 28, 2022 18:05:57 GMT -5
And there's foodcube startsolid appeats too often. I may record a video. And also game crashed sometimes when I installed the latest build.
|
|
|
Post by knightmare on Jun 28, 2022 22:53:29 GMT -5
Sounds like the sentien might need a longer pain debounce time set (currently 3 seconds). But its pain anins are only 4, 6, and 21 frames long, respectively. Each frame is 100ms. So maybe 5 or 6 seconds for the longer pain anim.
Also, the foodcube is an item, which has a larger bbox then the trap, which is (-4 -4 0) (4 4 8). If the trap lands too near to a wall, the foodcube will spawn partially inside the wall, and that error results. It would take some hacky programming to avoid that. You certainly don't want a trap with an item-size bbox, right?
|
|
|
Post by Guggenheim on Jun 29, 2022 9:04:52 GMT -5
Here's video (there's also funny bug with crucified insane):
|
|
|
Post by knightmare on Jun 30, 2022 1:52:06 GMT -5
Did some testing on the Sentien. The "pain animation" loop also happens when attacking with the hyperblaster, ionripper, and ususally even the LMCTF plasma rifle.
It's not actually a pain animation, but a separate "sentien_fend" function/animation assigned as the monsterinfo.dodge function. This just makes him stay in place and block with his arm, reducing damage by 15%. Stupid, as it just opens him to more attack. I may have to remove this, or somehow skip it for the ETF Rifle, hyperblaster, and ionripper.
EDIT: I found a "dodgetimeout" field in the Zaero dodge code that I missed when integrating its monsters. I got it added directly in the Sentien's code, with a bit of a boost to the damage reduction. Works well, he blocks a lot less often now.
I also fixed the trap from pulling in the crucufied insanes.
I'll see if there's any decent workaround I can do for the trap/foodcube startsolid issue.
|
|
|
Post by Guggenheim on Jun 30, 2022 10:21:18 GMT -5
Oh, there's also plasma rifle from Escape included in DLL? Really forgot about it. I've just played a bit with .ent files and put new enemies and items at original SP maps. I thought, if enemies can be replaced and they do drop missionpack ammo, why not also put missionpacks guns? So I added ETF rifles, prox launchers etc. somewhere. Also I put Sentiens and other enemies somewhere to make game harder. Such a singleplayer remix. And so I figured out that Sentiens are not so hard to take down.
|
|
|
Post by knightmare on Jun 30, 2022 12:26:57 GMT -5
It make sense if you think of the Sentien as an early, failed prototype for the tank.
|
|
|
Post by Guggenheim on Jun 30, 2022 14:55:34 GMT -5
It make sense if you think of the Sentien as an early, failed prototype for the tank. Yep, like in Citadel. He's less mobile but still have lots of HP. I guess about as much as Tank has. Good as early "mini-boss".
|
|
|
Post by knightmare on Jul 1, 2022 0:05:55 GMT -5
|
|