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 - karadoc

Pages: 1 2 [3] 4 5 ... 16
31
OXCE Suggestions DONE / Re: New game setup and pilots
« on: July 11, 2017, 11:41:13 am »
[edit]
It occurs to me that the stuff that I posted wasn't directly relevant to what this thread is about. The topic of this thread, about having pilots assigned at the start of the new game, is an issue worth discussing; and none of the suggestions I posted would have helped with that. So rather than risking hijacking this thread, I'll move my post to a new thread.

32
OpenXcom Extended / Re: [OXCE] OpenXcom Extended
« on: July 11, 2017, 11:06:00 am »
From what I can tell, you haven't included a fix for the crash we were just discussing; the one fixed by this.

For the particular save file that I uploaded, it was faulty AI which caused the crash - as you pointed out - but nevertheless, the patch that I've posted would prevent this crash and potentially prevent other similar crashes. The patch makes the behaviour of `getAmmoForAction`consistent with the new `needsAmmoForAction` function, in that neither should crash if the action does not have rules set.

Of course, you'll probably want to fix the AI problem as well. If you use my patch, then you can just leave the AI alone and fix it later. Alternatively, if you don't like my patch, you could just delete the problematic block from the AI and it will make no difference (other than avoiding the crash).

Here's the relevant bit of code
Code: [Select]
if (_visibleEnemies)
{
auto ammo = _attackAction->weapon->getAmmoForAction(_attackAction->type);
if (ammo && ammo->getRules()->getPowerBonus(_attackAction->actor) >= weightToAttack)
{
return false;
}
}
else if (RNG::generate(35, 155) >= weightToAttack)
{
return false;
}
If you delete that inner if block, that will avoid the crash. (That condition will never be true anyway, because the attack action never has ammo.) Perhaps it would be even better to delete the entire `_visibleEnemies` block though, just leaving the final random number test.

--

In other news, I've been making some tweaks to how items are arranged on the ground. Check out the attacked picture comparing the current unorganised equipment pile vs the sorted equipment pile from my code. I'll upload a patch for that soon if you have interest in it.

33
XPiratez / Re: Bugs & Crash Reports
« on: July 11, 2017, 02:41:25 am »
Shambler hunts pop up without monster hunt beeing researched. Intentional?
I believe so, yes. It has always been that way.

34
XPiratez / Re: heyyy Freak Out!: PSA about freak gal type.
« on: July 10, 2017, 06:19:24 am »
Makes me think that there's something off in the stat allocation.
I just glanced at the stat allocation code, and it looks like it should work as expected:

Code: [Select]
UnitStats minStats = rules->getMinStats();
UnitStats maxStats = rules->getMaxStats();

_initialStats.tu = RNG::generate(minStats.tu, maxStats.tu);
_initialStats.stamina = RNG::generate(minStats.stamina, maxStats.stamina);
_initialStats.health = RNG::generate(minStats.health, maxStats.health);
_initialStats.bravery = RNG::generate(minStats.bravery/10, maxStats.bravery/10)*10;
_initialStats.reactions = RNG::generate(minStats.reactions, maxStats.reactions);
_initialStats.firing = RNG::generate(minStats.firing, maxStats.firing);
_initialStats.throwing = RNG::generate(minStats.throwing, maxStats.throwing);
_initialStats.strength = RNG::generate(minStats.strength, maxStats.strength);
_initialStats.psiStrength = RNG::generate(minStats.psiStrength, maxStats.psiStrength);
_initialStats.melee = RNG::generate(minStats.melee, maxStats.melee);
_initialStats.psiSkill = minStats.psiSkill;

_currentStats = _initialStats;
(Although I don't know why it ignores the max for psi-skill. I would have thought that if the modder didn't want psi-skill above the minimum, then they'd just set the max to be the same as the min. There's no need to make a special hard-coded rule just for that.)

35
OpenXcom Extended / Re: [OXCE] OpenXcom Extended
« on: July 09, 2017, 06:15:35 am »
Right, fast fix is to not throw in `getActionConf`, but what point is then checking for ammo in that weapon then if always it will return `null`?
The point is that it allows you to ask for the ammo type without having to first check if the action is an attack, if the attack needs a weapon, if the weapon is loaded, and whatever else comes up. Apparently the AI code in this particular case just wants to know if their weapon attack power is above some arbitrary threshold to overrule their decision to use psi. If there is no ammo, that's fine - it just means that the attack power is not above the threshold, because there is no attack. It certainly isn't a case where we'd want to throw an exception. And I imagine there could be many other similar situation. There is no problem with getAmmoForAction returning null when there is no ammo associated with the action. That's exactly what I'd expect it to do, and it's a meaningful return value.

[edit]
By the way, if you are trying to catch logic bugs, I suggest that using something similar to `assert` would be nicer than using `throw`. As I player, I don't mind being warned that something unexpected has happened - but it is very annoying to lose playtime because of it. I mean, I think it would be nicer if there was a message saying that something has gone wrong without the game immediately crashing.

36
OpenXcom Extended / Re: [OXCE] OpenXcom Extended
« on: July 09, 2017, 04:05:23 am »
Here's another crash for you:

In the attached save, the game crashes after ending turn due to an 'unsupported action'.

I've looked into it, and found the problem is in `AIModule::psiAction()`
In particular, this part is causing the crash:
Code: [Select]
if (_visibleEnemies)
{
auto ammo = _attackAction->weapon->getAmmoForAction(_attackAction->type);
if (ammo && ammo->getRules()->getPowerBonus(_attackAction->actor) >= weightToAttack)
{
return false;
}
}
The `getAmmoForAction` crashes in this cause because the _attackAction is BA_RETHINK, which doesn't have associated rules, and hence causes a crash.

This seems easy enough to fix, but the best way to fix it depends a bit on coding style and on what you are actually trying to achieve with this bit of code.

For example, I personally think it's a bit weird that `const RuleItemAction *BattleItem::getActionConf(BattleActionType action) const` throws an exception when the result is NULL. If the result is never allowed to be NULL, then the return type should be a reference, not a pointer. So I'd probably fix the problem by not throwing the exception in `getActionConf`, and instead checking for NULL elsewhere. In this case, if `getActionConf` returns NULL, then `getAmmoForAction` should also return NULL.

If `getActionConf` no longer throws, then it would probably be wise to check for NULL every time it is used. But since no one is trying to catch the exceptions anyway, it won't really make any difference even it does return NULL an no one checked. It will just seg-fault instead of having a uncaught exception.

Anyway, as I said, the best way to fix this crash depends on how you like your code to behave. I'll leave it up to the people in charge. But I will say that in my view, `getAmmoForAction` should not crash no matter what 'action' is given to it. So I suggest that the bug should be fixed in that part rather than in the AI.

--
[edit]
On closer inspection, the code already has a function called `getActionConfNullable`, which is the same as `getActionConf` except that it returns null instead of throwing. As I said before, no one is trying to catch these exceptions... so I really don't know why the exception throwing version of the function even exists. In any case, here's a simple patch for the bug. Enjoy.

https://github.com/karadoc/OpenXcom/commit/0b1a95322c15ef61d40e2b6cc9a0499191bb5f2d

37
XPiratez / Re: Bugs & Crash Reports
« on: July 09, 2017, 02:56:33 am »
Disc-O-Death has the same TU cost for aimed and snap shot.
---
That might be intentional, to ensure that reaction shots have lower accuracy (reaction always uses snap shot).

38
XPiratez / Re: The most unusual moments at your campaigns
« on: July 07, 2017, 07:39:11 am »
The talk of zombie missions reminded me of a screenshot that I got from early in the campaign.

It was a zombie mission, and I'd cleared it out except for one enemy which I couldn't find. Eventually, "bug hunt mode" activated and so I found where they were...    It turned out to be a chrysalid.

Now, if I'd seen the chrysalid early in the mission I would have just bailed immediately; but this was after I'd already taken ages clearing out the entire map. I didn't want to lose all my loot and waste all that time. So I carefully set up a situation where the 'lid would charge towards me and not quite get a chance to attack, then I'd slam it with a heap of melee attacks; axes, sabres, etc.

The plan worked. At least, the part I described worked. It charged, and I hit it with melee weapons. Unfortunately, it didn't actually die.

The screenshot is what the start of the next turn looked like.

The only reason I had one soldier left alive was that they were already panicking too much to get into position properly for the ambush...

This particular situation went so poorly that I reloaded a geoscape autosave and didn't do the mission. I figured that it was basically game-over if I played on, given that I'd lost my entire crew and my only ship. (There's actually a follow-up story to this as well, but I'll save that for another time.)

39
XPiratez / Re: [MAIN] XPiratez - 0.99G2 - 4 Jun - Shipwrecked Summer
« on: July 07, 2017, 02:38:10 am »
You know, after spending 500 tokens on it, the electric lasso feels underwhelming. I thought it'd be like cattle prod, but both times I managed to try it out against unarmored human (1 G.O. and 1 Air Sailor), it failed to do it's job, and I hit twice each time. So much for that reliability.

Oh, and there was a word about an enemy base (despite me rocking the chart with 7k+ score). Is it a good idea to camp supply ships, given that I only have turtle, tac armors, early-game firearms and tons of explosives? I could use me some gauss guns.
The key advantage of the electric lasso is its range. It may take a couple of shots, but at least it allows you to it enemies that aren't standing next to you. For example, you can hit them through a window of a building instead of having to walk around to the door.

As for supply ships... if you're the kind of player who reloads when something bad happens, then the supply ships are worth it. If you're the kind of player who accepts bad results as part of the game experience, then you should probably avoid supply ships at this stage. Supply ship missions are very delicate and volatile... things can look like they are going well, and then suddenly you've lost your entire crew.

By the way, you won't be able to use the gauss weapons without extra research anyway.

40
XPiratez / Re: Mansion Mission Reports (Please Contribute)
« on: July 03, 2017, 05:24:18 pm »
No one mentioned manacles because they didn't exist back when that stuff was being discussed.

Also, the main problem from enemies waking up and walking off is gone now anyway. Enemies that have been unconscious will now surrender; so it doesn't matter a lot if a few of them are wandering around - just as long as you take their guns away!

The conversation in the rest of this thread was when enemies would need to be found and knocked out again before the mission was allowed to end. So enemies waking up was a bigger problem back then.

41
XPiratez / Re: Moding Question: Where to begin?
« on: July 03, 2017, 07:29:49 am »
I just checked the rules files. Every laser weapon I saw is set to ignore 1/3 of armour. This includes the ES laser weapons. I'm sure the armour penetration of laser weapons is mentioned in one of the 'pedia articles. So lasers are a bit better than they look from the raw damage numbers.

42
XPiratez / Re: Moding Question: Where to begin?
« on: July 03, 2017, 02:03:31 am »
You make a good point. Euro lasguns should be buffed so that they're worth the trouble. I'm thinking either making them inexhaustible, or ignore X% armour, or a damage boost (simple or stat based).

Right now they really don't outperform LC, AC or CAWs.

The base defense should be spaced out to maybe once a month or once every 2 months until you've been attacked at least a couple of times, this way players won't get killed from 4 attacks in 1 month.

In the end, if you take the eurocontract early on, the payoff (losses) for reneging should be better than staying in. If you're already late in the game then it wouldn't matter much.
ES lasrifles do outperform all those things. They've got better accuracy than LC, _far_ lighter than AC, and better range than CAWS; and all laser weapons have some armour penetration, which means the damage is pretty good too.

I'm not saying the eurocontract is worth it; but I do think ES lasers are powerful. I'd use an ES lasrifle over a LC or CAWS any day; and I'd only pick an AC on maybe one or two soldiers per mission.

43
XPiratez / Re: [MAIN] XPiratez - 0.99G1 - 25 May - Evasive Maneuvers
« on: July 03, 2017, 01:49:34 am »
Always hire brainers at the start of the month, so that you get the most value out of their salary. Don't hire them mid-month unless you are rich. (You have to pay the full salary even if you hire them on the 30th and they haven't arrived yet.)

With that, brainers aren't as big of a cost as they seem. Their research generates a large amount of points, which translates into a large cash bonus at the end of the month. At the same time, you can use the research to generate new money making opportunities. ie. Warehouse missions, animal hunts, undersea missions, bounty hunts, etc. are all early-game techs which will give you more money, and can get them sooner if you have more brainers...

In previous playthroughs I've experienced pretty heavy financial stress from hiring too many brainers too soon; but in my current playthrough I've found that I can just hire as many as I can buy at the start of the month; because the end-of-month bonus pays the bulk of their salary. (That said, there's a bit of luck involved in that currently, due to the negative score bug thing. At least, that's what I've been told. I haven't noticed it happen myself.)

[edit]
By the way, there are ways to micromanage your research to avoid wasting brainer-days, which is pretty important in the early game. But I'm starting to feel like everything I've posted so far is a spoiler, so I'm just going to leave it at that.

44
XPiratez / Re: [MOD] Lobbers use Throwing & other rebalances UPDATE 2
« on: June 25, 2017, 01:19:36 am »
I haven't had a problem with bravery training.

I carry bandages on every gal for every mission. If I'm explicitly trying to train a particular gal, I give her a first-aid kit (or the nurse outfit). Here are some of the things I do to get wounds to heal.
  • Early game: Use low-powered weapons in low risk situations. You'll get lots of wounded enemies even when you aren't trying to keep them alive.
  • Mid game: blowdarts are an excellent way to knock out enemies and cause wounds. You aren't 100% guaranteed to not kill them, but it's pretty reliable. I equip a blowpipe on every gal for every mission up until the late game. I don't actually use them on every mission, but they are small and light weight and they can come in handy in clutch situations.
  • Mid game: knock enemies out with the rum bottle. It does very little damage, and causes wounds. The rum is only used up if you drink it. Using it as a weapon does not deplete it.
  • Late game: wand of rending causes heaps of wounds... this opens up heaps of room for bravery training bordering on cheesiness. (And it's easy to cross this border and travel quite deep into the realm of mega-cheese.


As for the actual topic of this thread: The first couple of times I saw the thread I wondered "why would lobster-men use throwing weapons?" ...      I get it now. I don't really have a strong opinion about mortars and such though. I almost never use those weapons.

45
XPiratez / Re: [MAIN] XPiratez - 0.99G1 - 25 May - Evasive Maneuvers
« on: June 18, 2017, 10:07:20 am »
Fair enough. From what you've said it sounds like the problem is relatively recent, so my previous playthroughs weren't in great danger from the problem; and for my current playthrough I probably just had sufficient luck for it to not be a problem.

I can imagine that unseen ratmen patrols and such could generate negative points without the player being able to do anything about it. I just don't have a strong sense of the magnitude of the effect.

Pages: 1 2 [3] 4 5 ... 16