Creating a computer-aided version of WCTO

Okay; finally have the end-phase-engine online; did some initial internal debugging. I'll be continuing to do more this evening, and will post back here when it is ready for more public attempts to break it (I'll put it up on the SVN at the same time).

Issue number one: ships appear to think they need to power up weapons to begin tailing!
Tango 2 powers up their weapons.Tango 2 has failed to tail (Natural Fail)NOTE: Tailing is not yet online.Bravo 1 powers up their weapons.Bravo 1 can tell where will fly next (rolled: 7).NOTE: Tailing is not yet online.Pack Leader Alpha powers up their weapons.Pack Leader Alpha has failed to tail (rolled: 2)NOTE: Tailing is not yet online.
 
I found the opportunity fire bug that Ironduke was talking about. I had a logical flaw (> vs. >=) on my second attempt at opportunity fire from a week ago. I think it works now.

I've also now run through a few full turns; it seems to be mostly working; I welcome you guys to point out bugs and things that don't behave. We're especially testing missile flight (which I've done 0 testing on, so will likely break on the first missile), tailing, and point defense. We're also testing the overall system.
 
Hey look! that torpedo actually turned itself to chase Alpha Pack Leader! Sweet! (I'm seriously shocked that worked without any debugging or fixes by me. )

Just a note to everyone: missile flight modelling was something I debated a lot (see above). In the end, I want to point out that all missiles still have to take their turns at the 50% (rounded up) point in their movement, BUT they effectively have infinite acceleration, meaning if they think their best path is to fly a much-reduced max speed for this turn, they will, and can still resume max speed next turn.

edit: torpedo vanishes because it had been around for 3 turns.
 
Another ruling clarification: Do we want missiles with multi-turn target-chasing capabilities to be able to bank?
No, since they'd need lateral thrusters for that - which, as far as I'm aware, they don't have in the WC universe. (At least I can't remember seeing a missile bank in any cutscene or ingame situation.)

Another idea with missiles would be "magical instant movement:" You just take a look at their fire arc, and if their target is within range, it hits directly (or tries to hit). While this would be easier to handle as far as missile movement goes, I think it would leave more questions open when it comes to point defense, chaff, friendly fire etc. So on second thought, better scrap that idea. ;)
 
...to move the code between my machines I've been dumping up and down some partial commits...
That makes sense, I suppose, although personally I would have just e-mailed them to myself, between my home and office addresses.

There's an error in combat_phase_engine.php that I can't seem to work out without having a better understanding of what's going on in the code. I suppose I'll have to wait till you get to your next progress commit.

phase4.php said:
Fatal error: Call to a member function available_refires() on a non-object in combat_phase_engine.php on line 122
 
Fatal error: Call to a member function available_refires() on a non-object in combat_phase_engine.php on line 122

That ended up being, ironically, a syntax error. Notice it was calling $piece->available_refires(). That should have been $ship->available_refires(), since the local for loop was on ships only, and piece was probably pulling its last value from the orders loop (which apparently may have been a non-ship, or non-object? Maybe it got un-initialized?)

Weird I didn't get this last night, but late night coding often deceives one into thinking everything works when it doesn't!


As a side note, I still have the $this=null; in there as well, so at some point we'll have to see if a missile successfully self-destructs because of chaff.
 
Another idea with missiles would be "magical instant movement:" You just take a look at their fire arc, and if their target is within range, it hits directly (or tries to hit). While this would be easier to handle as far as missile movement goes, I think it would leave more questions open when it comes to point defense, chaff, friendly fire etc. So on second thought, better scrap that idea. ;)

I considered this as well; my main reason for not doing it was the unpredictability of it. I didn't want players to say "huh? how did that missile hit me?" so I tried to go with something predictable, that a player could walk through in their head to make sure they were safe before issuing movement. We'll see if it worked, or if everyone gets confused.
 
I saw that available_refires() was a method of the ship class, but I wasn't sure of what was going on, so I left it alone.

It looks like your recent updates allows me to see the Orders button again, and properly styled too. (On my copy, I mean, I know it was working on yours.)

Edit: Never mind. I realise now that the orders button only appears at the beginning of a turn.

Edit: Looks like things are still broken, and only turn up at certain stages in the game. I'll let you sort things out since you seem to be active right now.

Warning: Invalid argument supplied for foreach() in /home/agespast/www/www/wedge009/phase4/missile.php on line 276

Warning: ksort() expects parameter 1 to be array, null given in /home/agespast/www/www/wedge009/phase4/missile.php on line 283

Warning: Invalid argument supplied for foreach() in /home/agespast/www/www/wedge009/phase4/missile.php on line 285

Fatal error: Call to a member function to_hexpart() on a non-object in /home/agespast/www/www/wedge009/phase4/indicator_funcs.php on line 43
 
Yeah, I just caught those as well, and got them fixed, I think.

Take a look at the turn 6 EP and turn 7 MP. That's an FF missile; did it show up where you thought it would? We discussed above that FF's would try to target phase-shielded ships, BUT since missiles can't bank, the Alpha Pack Leader is actually *not* on an achievable square for the FF, assuming it has to turn at the halfway point of its movement. (i.e. it is effectively out of range, and therefore the missile just flies off into the distance).
 
I've put a lock on the current turn because Tango 2 should be able to chaff against the DF (for a very lucky chaff shot) but can't. I need to verify this is working, so I've frozen progress. Please don't submit Tango 2's orders, and even if you do, it won't go to the next phase.

Unfortunately, I won't be able to work on this for a few hours.
 
Okay unlocked and fixed the chaff issue. Unfortunately, we got neither a message about releasing a chaff pod, nor a message about the DF smashing through the chaff.

Fixing that oversight now.

edit: re-wound time: looks like I've got missile damage reporting now, but it doesn't look like chaff pods are being released. Need to look into why not.
 
Okay, now we have a new problem. I forgot to add the submit-end-orders file to the SVN. This meant only one of my two machines had a good copy of it. now I realize the machine I'm on doesn't have the working copy of it, and I just over-wrote the one that did work with the local copy. Hopefully I haven't made the reverse mistake and when I get back to my office, the submit-end-orders file is sitting there, ready to be re-uploaded, and added to the SVN. In the meantime, any orders you submit in the end phase will be interpretted as combat orders, giving hilarity as the end-engine tries to turn them into evasive or chaff requests.

Anyway, this is why the chaff and tailing requests have stopped working suddenly.

edit: to clarify, you can still order them appropriately (since the preengine is fine) but they just won't get processed.
 
Hopefully I haven't made the reverse mistake and when I get back to my office, the submit-end-orders file is sitting there, ready to be re-uploaded, and added to the SVN.
Keeping my fingers crossed...!

Is there any easy way to get a log file for debugging, by the way? It might help to spot/trace some errors if you had a detailed log. (In Flash, there's a nifty "trace()" function to do the job, but I'm completely unfamiliar with php.)
 
I'm not sure if you need to have administrative privileges on the server PHP is running on.

Did the Sabre just kill its wingman? :)
 
I was lazy and I haven't invoked any of the native php debug tracking features; as such we can only deal with syntax and mis-sent var-type errors as they come up. Otherwise, since php is a run-time-compile language, you can't exactly pause it in operation; at least not without access to the command line, which I do not have. What I can do is modify the code on the fly and throw in absolute breaks with screen outputs of what I need to check. Very tedious, but workable. Anyone who can read my code and has ftp access could do it, but otherwise the best you guys can do is look for wrong behaviour and then report it back.

As a side note, I've put up (and SVN committed as well) the correct submit-endphase-orders, so we can one again try to tail/chaff/afterburn successfully.
 
I'm not sure if you need to have administrative privileges on the server PHP is running on.

Did the Sabre just kill its wingman? :)

At the moment, there is no such thing as teams coded in. In fact, there is currently no intention on my part to do this before the beta launch; it takes priority lower than things like the flak and the other cap ship weapons.
 
I wasn't commenting on the lack of teams, just that it looked funny blowing up your own wingman.

"You're a traitor!" :)

So... you mean to say that if teams were implemented, there would be no friendly fire?
 
No, if teams were implemented, there would be no *intended* friendly fire. The WCTO manual has a few friendly fire rules for when you are attempting to shoot past your teammates or at a ship on the same square. At the moment, none of those are coded in, but contrarily, you can directly target your teammates.

As far as being a 'real space simulator' goes, both should be true (accidental hits AND obvious intent to target your teammates), but for a friendly-ness point of view, perhaps only the former will stay in the long run.
 
Dealt with a few FF target acquisition bugs, and with a chaff bug. That said, at the moment, I've discovered FF missiles are immune to chaff because they have no permanent target, which is how I was chaffing things. I'll update that later today.
 
Looks like $this = null doesn't work. Drat, okay passing out a failure argument then.

Also a rules question for ironduke:
I just had a roll of 1 come up, with a guidance of -2 (ff) therefore the roll was -1. I assume you want me to treat this as a 1, i.e. failed hit. In this scenario, shall I report the negative number, or just report a value of 1?
 
Back
Top