aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TCH

Pages: [1]
1
Programming / Re: How to force a blaster explosion?
« on: August 22, 2019, 04:30:46 pm »
Thanks for answering. I've copied the necessary code and it worked, now the damaged units which should have died, died. However i forgot to tell in the opening post, that the explode() also do not trigger the chain explosions until end of turn. I've found checkForExplosions() and applied and that worked too.

However in the meantime i figured it out, that if i give no item, unit and tile to ExplosionBState and i use statePushNext() instead of statePushFront() then the explosion works normally. However, it's power is always 120, because if i try to create a blaster item and use it, then it does not explode.

So, instead of futile tryings, i modified the ExplosionBState class to be able to accept a new param (forcedPower) which overwrites the wired-in 120. (But i had set its' default to 120, to preserve backward compatibility.) I also modified the tile and itemless explosion's default radius (6), to divide the given power by 20. (Which is 120, so the default radius is still 6, but now it's dynamic.)

Patch is here: http://oscomp.hu/depot/ExplosionBState.patch

And with that, i was able to add the new function to debug mode, to create custom explosions. I made it configurable (debugBlast in options.cfg) and i added two more hotkeys (Ctrl + KP_PLUS/Ctrl + KP_MINUS), to be able to increase/decrease this value ingame. The step is also configurable. (debugBlastStep)

Patch for this is here: http://oscomp.hu/depot/DebugBlast.patch

2
Programming / How to force a blaster explosion?
« on: August 21, 2019, 04:32:00 pm »
I'm trying to add a new hotkey in debug mode for creating a blaster explosion. However, it does not want to work.

Code: [Select]
// B - create blaster bomb explosion
else if (_save->getDebugMode() && action->getDetails()->key.keysym.sym == SDLK_b && (SDL_GetModState() & KMOD_CTRL) != 0)
{
debug("Blast it!");
Position newPos;
_map->getSelectorPosition(&newPos);
newPos.x *= 16;
newPos.y *= 16;
newPos.z *= 24;
if (newPos.x >= 0)
{
//_save->getTileEngine()->explode(newPos, 320, DT_HE, 16, _save->getSelectedUnit());
_battleGame->statePushFront(new ExplosionBState(_battleGame, newPos, new BattleItem(new RuleItem("STR_HWP_FUSION_BOMB"), _save->getCurrentItemId()), _save->getSelectedUnit()));
}
}

The explode() call what is commented out, works, but only makes the terrain changes and do the damage to items and units. I could live without the animation and sound of the explosion, but the so-damaged-they-should-die units only die after the end of turn.

I tried to copy the ExplosionBState calls, but i am missing something.

Any ideas?

3
Troubleshooting / Re: psi training and base detection
« on: October 29, 2017, 04:09:30 pm »
Oh, i did not know that.
I always played the game on Amiga and there Supply ships only appeared if a base is already constructed. I thought it was the same in the PC version.

4
Troubleshooting / Re: psi training and base detection
« on: October 29, 2017, 01:38:10 pm »
An administrator closed the case as not a bug, so i cannot comment there, thus i have to do it here:
This is definetely a bug, if not a code bug, then a conceptional one. In the original game, Supply ships do base supply, they are not supposed to construct bases or infiltrate governments. Even the ufopaedia states this:
Quote
Once an Alien base is constructed, it is resupplied on a regular basis by special supply vessels. If one of these vessels is detected while landing then it is certain that an Alien base is nearby.

5
Troubleshooting / Re: psi training and base detection
« on: October 29, 2017, 10:16:42 am »
And yet, I had supply ships on supply missions, landing somewhere completely different as was advertised by the hyperwave decoder. (No, don't have a save for you right now, sorry.)
Why? That wasn't like this in the original game.
And yet, I had supply ships on supply missions, landing somewhere completely different as was advertised by the hyperwave decoder. (No, don't have a save for you right now, sorry.)
I can confirm that and i have saves, already uploaded to the bugtracker.

6
Troubleshooting / Re: psi training and base detection
« on: October 28, 2017, 10:38:10 pm »
I always follow the Supply ships, but sometimes the base is simply not there. I reported this issue in the bugtracker and attached three different saves with this situation:

https://openxcom.org/bugs/openxcom/issues/1364

7
Troubleshooting / Re: psi training and base detection
« on: October 25, 2017, 04:52:04 pm »
Yep, i know, i patrolled exactly over the Supply ship's landing point. This worked for six times (i found six bases) in my current game, but it didn't in several occasions. Maybe it's not yet constructed... I'll try more. Thanks for answering.

8
Troubleshooting / psi training and base detection
« on: October 25, 2017, 02:34:23 pm »
I just got two questions, but since i don't know if they are bugs, i'll ask before reporting:

- I turned on the option to be able to assign the soldiers to Psi-training at anytime. The Psi-Labs were finished exactly on the start of the new month and i assigned the soldiers in the soldiers screen on all bases. One month has passed, but much to my surprise, instead of getting Psi-skills for all soldiers, only one soldier got Psi-skills per base. (http://oscomp.hu/depot/xcom_psi.png) Is this a bug, or the soldiers randomly progresses? (I've read the description, that it takes 30 to 60 days to complete the basic training, but if that is not finished, shouldn't everyone has zero then?)

- I see Supply ships at several areas on the planet, a lot of them, but i cannot detect the base if i patrol at the landing zone of them. I hunt for the base for hours or days around where the Supply ship landed and no avail. Bug or intended?

Pages: [1]