-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Install of stfc2 #9
Comments
Hello, I'll try to help. First of all I've added to the repository a sample of config.inc.php (it was missing since a lot). You'll need to fill it with your configuration. Please take note that present version of the repository still assume the game running with two galaxies and a IPB forum, so if it's not your case you have to modify at least login.php, register.php, stats.php in pages folder and portal.php in modules folder. I don't understand your trouble with the crons. If you mean the scheduler, they are all stored in a separate repository here on GitHub. There are mainly the following running tasks:
Depending on your configuration of the Galaxy (especially if you want NPC or not), it's possible to disable or customize the last two and main one. Let me know if everything is clear now. I hope you had and maybe you'll have great time on stfc! :) |
Thx this helps a lot. $config=array(); define ('ERROR_LOG_FILE', '/var/www/virtual/game.sbhost.ch/htdocs/error_log.htm'); this is my setting on the dev box now. Now the Start page open. but i have problems with queries from db. 18.11.14 20:13:15 User: external user Database Error: No error occured (0) But the values are rigth in config.inc. i use mysql 5.5.40-0+wheezy1 can mysqli be the problem? and really thx for your help. :) |
It's seems quite good to me, only the define JSCRIPT_PATH needs to point to the folder containing the js and not directly the file. On mine config it's configured as '' and it works. Current version of the game code is still using the old mysql php extension so yes, mysqli could be a problem if you have only this extension enabled. Luckly I've pull a request #6 in order to provide support to that extension, Before applying the patch to your code, however, which page of the game show that error? I mean, you're able to log in? |
Error shows at login, register and statistics. |
Hmm, did you correctly modify UI/game/include/global.php in order to point correctly to your config.inc.php file? |
i think so: so i try now your new merged version to see is mysqli the problem. but anyway really thx for your help. |
Ok, it's seems a valid path indeed. Check the new mySQLi support, however I'm almost sure that the game can run on mySQL 5.5 without it with some failing queries, the problem you're facing seem something more serious. It seems the game cannot access to the whole database. Just to be clear I'll repeat myself: are you sure you removed all references to secondary galaxy from the pages you mentioned? As I wrote in the first post? |
Ok startet now a new devbox. install all like you write here. Now it look so as it connect to database. crons not startet now. have tried to register first user. but on click the register button only refreshing page. and no new user in db. if you want see the code on server, i can give you access by teamviewer. but i search to find the problem. every day it looks a little bit better :) |
it seems like i have to start the galaxy first. but dont find where. |
Hello, are you saying that after you've filled all required fields in registration form, when you it Register button nothing happened? This sound really strange to me. No errors came out? It could be some skin related problem. After Register button is pressed the game performs some checks before creating the user (it should inform the user if something went wrong however), and if everything is fine it create the new user in the DB, the required instructions are just two:
if you downloaded the empty database from the repository you need to create at least one row in the skin table and add you own skin. |
It's difficult to have the game up and running, I know. That's why I'm trying to rationalize its code, restructure it in order to have a base in the future for a setup script. At the moment lot of the operations needed must be performed manually. I think your problem at the moment is the empty DB, take a look to game/modules/tools/world/reset.php (unfortunately it can be called only logged to the game), you should find the needed mySQL query to create admin user. I had forgotten that the default skin can be found here: https://github.com/stfc2/UI/blob/master/game/modules/tools/world/default_template.html |
Yes its the empty db.
|
Well, I'm really sorry but my intention is to store on the repository only the structure of the DB, while the install script will do all the needed task and insert all the needed data. There are several steps to perform in order to start the galaxy, almost of them are already automated even if sparse in several scripts, my intention is to create a sort of "caller" of those scrips including a new one asking the installer for admin user authentication. For your purpose you just have to take the data from the script reset.php and alter the password with phpMyAdmin to set your taste. UI repository is not complete, when the work will be finished you'll have to download the latest release and launch the web installer. |
Ok i try it after work to add the values from reset.php.
|
That's good, you were able to login at last!. You're near the end to the job, setup the skin, use the admin tools inside the game to create the star systems slots, install the BOT if you wish and create some planets. Here you have several choices:
|
Oh god... can you make me a dump from your db? |
Yes, it's normal. I'll explain why: the version of the code stored on the repository until yesterday, assumed the game is running side by side with a IPB forum. In the portal, as I wrote in the first post, the last five topic on the forum are displayed. With that version, when you try to open the portal (the first page of the game), if the forum isn't detected a blank page is displayed (that's an error of course, a message should be more appropriate). This afternoon I've fixed this. I've changed config.inc.php and portal.php in order to display forum info only if available. To turn off this feature you have to set $config['forum_show'] variable to 0. I've made myself on my computer a test and it worked: you need this SQL queries (if you haven't already performed on your DB) in order to login to the game:
|
I know it can seems quite boring but once you get used to it, you'll find yourself seting up the game in a matter of snap. :) And in the future there will be the installer. PS: Remeber to update your source code, I've made some fixes just today. |
Create the template: Replace < the template skin here > with the whole content of this file: https://github.com/stfc2/UI/blob/master/game/modules/tools/world/default_template.html |
Now it looking good. Can now login. |
Hello, have you downloaded the source code from Scheduler repository? Once done, suite a proper place on your server and configure config.script.php according to your data. After everything is setup properly you need to add a cronjob for each deamon you want to run. The minimum to see the tick is a */3 minutes job running main.php daemon. Then you can add the other tasks. Rememeber that ships fights need the combat daemon available from Combat repository. |
Hi yes i loadet it. placed it to my root home folder. and cons:
so i think it have to run.? |
Yes, it should, maybe before piping to /dev/null, pipe to a log file to see if everything went fine. Mine crons are:
I've made some little sh scripts to call php scripts. |
Hi good day, the finish i can see :) tick and crons running now. generetade pics from galaxy and quadrant not showing. a hint for me? |
Al the galaxy images must ne created. Log in the game as admin and go to admin panel - world - recreate static maps. Remember that the folder shall be writeable by Apache as several others folder too. I'm glad you're almost done, setting up stfc is a tough task. :) |
yeah all pics now show. so now i can't see problems in admin account. user on login becomes the wihte page. because the default template not set in user_templates on user creation. how i can make dem to set as default on user creation? the user can not start build houses. they are red, but i don't see why? |
Hello, did you insert a new line in skins table containing the default template? When a new user is created, it copies from the default template (stored in skins) to user_template table, letting the user alter their skins without compromising other users. If a newly created user cannot build anything, it's normal because there are no resources available on the newborn planet. Let some ticks to run, the first raw materials should start to be collected in the silos. |
Soory just a nother fault by me. script-path is set in config.script.php Thx anyway |
Don't worry isn't you, it's the game structure that's quite complex and twisted. There are more or less two configuration files:
Those are the main two handling installation issues, There are then other two files (one I think it's mistake):
|
Hi i found a problem with notepad. i found an output: PHP Warning: mysql_real_escape_string(): Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/game/submit_notepad.php so the game try to use not the game db from config inc. how to chang it to game db? |
Hi |
Hi, could you please open different issues for the problem found in order to have more clarity? Thank you! We should stay with installation issues in this thread. |
After a lot of things are working, i started to test HZ. |
Yes, current version of the Trade Center doesn't have its own resources. If you want to enable that feature you have to modify line 42 in the file: https://github.com/stfc2/Scheduler/blob/master/NPC_BOT_defines.php and maybe also line 39, but at the moment I don't remember very well the mechanism. That's because resources are deposited after settlers auctions are performed but we should ask to Kail72. |
Hi after i have changed line 42 to 1 i have a new part in npc log: Starting Update Ramona resources svailability... i tried at line 32 0 and 1 same result. |
Hello, Could you please check installation log of the NPC and see if the Ramona BOT had a planet? It seems that the problem. |
|
Hi Install log:
Full NPC log:
|
Hi, from the log it seems that you switched PICK_RESOURCES_FROM_PLANET to 0, so the BOT tries to pick resource from the Trade Center that it's empty. Now that the BOT has its planet, you should set PICK_RESOURCES_FROM_PLANET to 1 and check in the log if after few ticks the BOT start to fill the resources available taking them from its planets. Of course if the planet doesn't have any, the TD will stay empty. It's not a bug, it's a wanted feature that the TD will grow after some time but of course you can change its behavior in your fork. :) |
Hi thanks a lot. now the TD are working. |
Hello, nice to hear that. Let me know how it works. |
Hi, I found a few other todos:
If i find more or have some more questions i will message here again. Regards Saboti |
Hi Saboti, thank you for your report. Yes, there are some folders that are needed by the game but they are not stored in the repository. I think I can add them. About the tiny galaxy image, it's created with the admin tool create static maps that can be found in world menu. Yes, install script should call it autonomously. :) |
Thank you for your replay @kirirur.
The new Player is boosted so much after registration that it should be possible to create a new Ship template. Any ideas? |
Hi Saboti, glad to help, you have boosted the player and you're seeing player points updated? In order to create a template you need local points (planet) and global points (player) matching the required by the template. |
I have changed noting, if i register a new player its automatically boosted to 650 Points local & global. |
Hi @Saboti, I don't know if you have noticed but I came to your setup and verified the issue you're talking about. It's really strange, this bug is new to me. It could be some mySQL related issue, on my test machine, running mySQL 5.6.23 and PHP 5.5.22 everything works as expected and the template is added to the list. |
The ship_template.php version you are trying to use is a work in progress; it needs a new version of ship_componentsX.php modules wich are still under development. |
@Kail72 thank you for the replay. |
@kirirur great thank you for this hint, with the old Version the Templates are added. |
@Saboti nice to hear that! :-) |
One Question regarding the Build Times, how can i lower they? In include\global.php? |
Hi @Saboti yes alla the structures costs and building times are stored in the file you mentioned. Ships components instead are in include/static/ship_components_x.php (where x stands for a number identify a race). |
I need some help with the config for the 2nd galaxy. How do i set it up? Another config.inc.php? |
Hello Saboti, do you want to setup a second galaxy? Do I understand correctly? If so, there are of course several ways you can do that, the easiest I think, it's to duplicate the game folder and adapt the "external" php files to handle two items. Perhaps it isn't the most efficient way but it works, we did that in the past to handle two independent galaxies with different setup in the past. Probably you can make some optimisations if you just need to share the same code for all the galaxies and implement just few modifications between them. |
Hi
i tried to install your branch.
I have setup the ui in webfolder and databes in mysql.
Now i can't find the config.inc.php. So it shows me no connection to databes.
Ande a can not see, waht for crons are needet.
Du you have a setup how to?
Or you can help me?
And thx for you work. was a long time ago i have played this game :)
The text was updated successfully, but these errors were encountered: