-
Notifications
You must be signed in to change notification settings - Fork 116
OPBE compatibility #325
Comments
Did you look into the folder that has a 2moons sub directory....its pretty straight forward from their |
Well, in the library, there's an "1.7.2_injection_mode", so at first I assumed it was OPBE 1.7.2 (I honestly am pretty new in server management, and my php knowledge is too limited), but after searching around, I fould out that it was for 2Moons 1.7.2. So I wonder if there's a way to make it compatible again. I honestly hope so, because having a light fighter alone dealing more than 300k damages because of the presence of ~150 probes and solar satellites, while I had 7000 others ships, including a few handmade ones (while there was no loss at all, didn't understand why, despite the 300k damages) doesn't feel right, be it for me or the players. |
Try to open the combat php and replace what's in their and see if it works... |
the calculateattack, you mean? It makes an error "files not found" because of the requires at the start of the file |
I'll look at it in a bit and get back go u
…On Aug 22, 2017 17:20, "Para0234" ***@***.***> wrote:
the calculateattack, you mean?
It makes an error "files not found" because of the requires at the start
of the file
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVE5aM_EAo-h_SOJ_J-FuzTFQIX91lGYks5sa0YXgaJpZM4O_KX4>
.
|
Thanks a lot! |
I'm interested, too. Drop a line if you need some help. |
so i spoke to someone who claims it works.....the changed "" then in implementations\2Moons\1_7_2_injectionMode (changed to 1_8_) |
did you follow this? you also have to add the whole git repo with the folders and files to your server not just that one file. You can change MissionCaseAttack.class.php (Click me to go to line) to something like //you must add these two files!
include_once ( ROOT_PATH . PATH_TO_OPBE_CORE . 'utils/includer.php' );
include_once ( ROOT_PATH . PATH_TO_OPBE_CORE . 'utils/LangImplementation.php' );
//you can alster the config for OPBE in file https://github.com/jstar88/opbe/blob/master/constants/battle_constants.php
$combatResult = new Battle ( $fleetAttack , $fleetDefend );
$startBattle = DebugManager::runDebugged(array($combatResult, 'startBattle'), $errorHandler, $exceptionHandler);
$startBattle();
$report = $opbe->getReport(); for my serevr we are using XGP and we altered our attack.php to have //Start of Battle ---------------------------------------------------------
$battle = new Battle ( $attackers , $defenders );
$startBattle = DebugManager::runDebugged ( array( $battle , 'startBattle' ) , $errorHandler , $exceptionHandler );
$startBattle();
//End of battle ---------------------------------------------------------
$report = $battle->getReport();
$steal = $this->update_attackers ( $report->getPresentationAttackersFleetOnRound ( 'START' ) , $report->getAfterBattleAttackers() , $target_planet );
$report->setSteal($steal);
$this->update_defenders ( $report->getPresentationDefendersFleetOnRound ( 'START' ) , $report->getAfterBattleDefenders() , $target_planet , $steal );
$this->update_debris ( $fleet_row , $report );
$this->update_moon ( $fleet_row , $report , 'Moon' , $target_userID ); We have it so we can use the old attack engine as the base attack.php and the one that uses OPBE as attack_opbe.php and switch it in the ACP (admin control panel) so we have two attack engines. And it works fine. I am not sure how will this will work for 2moons as i only look at the code for things like this, but it should be pretty much the same. |
The whole opbe is in my server, and has always been. It's in includes > libs, to be more exact @lilmnm-kamikaze- , about the change in MissionCaseAttack.class.php , I did it, exactly the same way you did (of course, I changed the pathways), and I get the exact same result when I do a battle simulation. An about:blank page. About the attack.php edit, I honestly fear that I'm far from good enough in php to be able to do this. By the way, in order not to put harm to the server and to prevent a maintenance in my server, I tested on my computer (localhost and everything), and said computer is...well, not powerful at all. May this be the reason why? |
What web browser do you use? Do you get an about:blank page when trying to look at the battle report? For the battle sim you have to format the battle report to show correctly. instead of whats in the ShowBattleSimulatorPage.class.php file What you changed in MissionCaseAttack.class.php you need to change in ShowBattleSimulatorPage.class.php (go to Line) Both use the same code but the sim doesn't change anything in the database. |
I use Google Chrome. I tried to launch a combat against a random enemy on my local server. I changed ShowBattleSimulatorPage.class.php, but there is no difference. Still an about:blank page. Oh, and when I cancel the fleet, it never comes back either. |
Do you see any error logs saved anywhere on your server. Maybe a default error_log or something at the root or in the OPBE location? what server do you have the game on? |
The game is in localhost, and I use UwAmp for this. I don't want to try in my online server until I'm sure it works. I changed the path on the modifications you gave me to fit on my computer. I've searched in the opbe library in the game folder, and I didn't find any battle report. |
(and neither did I anywhere else) |
Ill set up a 2moons server on my server and work look into it |
Thanks |
Little update on that side. I got a little fix, and after looking at the error, I got this:
After looking around, I found this guy who had the same error message, and the creator answered that OPBE wasn't compatible with his version. so I guess OPBE isn't compatible with that version either. And I opened a new issue by the way in hopes to fix the battle system itself. |
Sorry to bring this up so late but after a few years having OPBE on my game it seems that it has several bugs and one including a 0 attacker loss bug that has the attacker getting 0 losses if the battle ends in a draw. I am currently looking to use a different battle engine thn OPBE or fixing the bug which could take some time. |
@lilmnm-kamikaze- hey take a look at SteemNova reworked combat engine steemnova/steemnova#50 |
Hi,
I'm trying to install OPBE on my server (local for now, multiplayer if it works) because the cmbat system seems really messesd up.
But the problem is that when I install it, I get a blank page instead of a combat report.
The problem seems to lie in the fact that I use 2Moons 1.8.
So, I wonder if there's any way to make OPBE compatible with 2Moons 1.8, and if there is, how can I do it?
Thanks in advance
The text was updated successfully, but these errors were encountered: