Giter Club home page Giter Club logo

nczone's Introduction

nC Zone

Installation

Installing phpBB3

First of all, you need to install the most recent version of phpBB3. Since there already is a good guide to install phpBB3, we leave this part out.

However, since we are are only a small developer team, we don't try to match all phpBB3 dependencies. In our production environment, we current use

  • PHP 7.2
  • MariaDB 10.1

Other environments might work just fine, but they might also be some issues, we didn't test it. If you have issues using a different environment, please create an issue or a pull request!

Installing nC Zone

There are currently two options to install the nC Zone. You can either clone the repository using git or download a ZIP and extract that one. We recommend using git, because right now we don't push releases with a version number but just develop on the master and using git makes it easier to update. However, aside from a little more work, it's perfectly fine to download and use a ZIP and it's probably the better way if you don't know git.

Using git

Find your ext directory in the root path of your phpBB3 installation. In this directory, create a new directory called eru. Clone this repository into that directory so the path looks like

/path/to/your/phpBB3/ext/eru/nczone/ext.php

Skip the next chapter explaining how to perform these steps using a ZIP file and go on reading Installing the extensions.

Using a ZIP file

Find your ext directory in the root path of your phpBB3 installation. In this directory, create a new directory called eru. Find the Clone or download button above, click on it and then click Download ZIP.

Move the ZIP to the directory you just created and extract its content. Rename the nczone-master directory to nczone, so the path looks like

/path/to/your/phpBB3/ext/eru/nczone/ext.php

Installing the extension

Login to your phpBB3 installation and go into the ACP

Go to the Customise tab

Click Enable next to nC Zone.

You now have a (not yet completely) running nC Zone :) ! Please keep on reading the next chapter.

Configure your Zone

To configure your Zone, go on the Extensions tab in the ACP (see above).

Look for nC Zone in the menu on the right

Click through the sub-categories. The default values for all settings should contain sane values, but you might want tweek some configurations. Hopefully, all configurations are self explanatory, if not, please feel free to open an issue. Please also take a look at the following topics of this README to see how to find out forum and post IDs.

Setting up a Forum for posting matches

First of all, you need a forum where matches can be posted. Take a look at this guide to see how to create one. We recommend to give no one permission to create a topic in this forum, since the Zone will create a new topic for every match. After you created your forum, go back to the board overview and click on the newly created forum. Take a look at the URL field of your Browser, it should say something like https://new-chapter.eu/viewforum.php?f=110 (with you own domain of course). Copy the number which follows after the f=, so in this case 110.

Go back to the ACP and click on Extensions

Under nC Zone on the left click on General Settings

Look for Post forum ID on the right and fill the number you just copied in the belonging field.

Setting up Rules for your Zone

In a forum of your choice (can but don't have to be public visible), create a topic containing the rules which should apply in your Zone. Save the post and go to the topic. Click on the small icon marked in the following image

Take a look at the URL field of your Brwoser, it should say something like https://new-chapter.eu/viewtopic.php?p=132869#p132869 (with your own domain of course). Copy the number which follows after the p, so in this case 132869.

Under nC Zone on the left click on General Settings

Look for Rules post ID on the right and fill the number you just copied in the belonging field.

Setting up Civilisations

The Zone was primarily designed for Age of Empires II, but it should work for most RTS games. In order to not limit ourselves to a single game, we decided to not ship civilisations (in short: civs) by default. For drawing matches, it's is however required to have civs. You can either create them by hand, or, if you're playing the most recent version of Age of Empires II, take the ones we already prepared.

Creating your own civilisations

In order to create civs, you have to have the privileges to do so. You can get the privileges by for example assigning them to the Administrator group. But it is also possible to assign them to a dedicated group or even a single user in a similar way like described below.

In the ACP, go to the Users and Groups tab

Click on Group permissions on the left, select Administrators in the drop down menu and click on Submit

In the drop down menu on the top, select Global Moderator permissions, click on Go and then click on Advanced Permissions

Click on the nC Zone tab and then on Yes to give all permissions to the Administrator group

Confirm by clicking Apply permissions.

Now go back to the front page of your board and click on nC Zone in the menu

Afterwards, click on MCP in the same menu. Click on the nC Zone tab

Now click on the Civilisations tab on the left. From here on, everything should be self-explanatory :) . If not, feel free to open an issue.

Apply our prepared civilisations for Age of Empires II

This wont work if you already have manually created civs before. If you have created civs before you have to delete them by truncating the phpbb_zone_civs table before.

You can apply our prepared civilisations for the most recent Age of Empires II HD version (there are more civs coming with Age of Empires II Definitive Editions), by executing the following MySQL query on your database:

INSERT INTO `phpbb_zone_civs` VALUES (1,'NCZONE_AZTECS'),(2,'NCZONE_BERBERS'),(3,'NCZONE_BRITONS'),(4,'NCZONE_BURMESE'),(5,'NCZONE_BYZANTINES'),(6,'NCZONE_CELTS'),(7,'NCZONE_CHINESE'),(8,'NCZONE_ETHIOPIANS'),(9,'NCZONE_FRANKS'),(10,'NCZONE_GOTHS'),(11,'NCZONE_HUNS'),(12,'NCZONE_INCAS'),(13,'NCZONE_INDIANS'),(14,'NCZONE_ITALIANS'),(15,'NCZONE_JAPANESE'),(16,'NCZONE_KHMER'),(17,'NCZONE_KOREANS'),(18,'NCZONE_MAGYARS'),(19,'NCZONE_MALAY'),(20,'NCZONE_MALIANS'),(21,'NCZONE_MAYANS'),(22,'NCZONE_MONGOLS'),(23,'NCZONE_PERSIANS'),(24,'NCZONE_PORTUGUESE'),(25,'NCZONE_SARACENS'),(26,'NCZONE_SLAVS'),(27,'NCZONE_SPANISH'),(28,'NCZONE_TEUTONS'),(29,'NCZONE_TURKS'),(30,'NCZONE_VIETNAMESE'),(31,'NCZONE_VIKINGS'),(32,'NCZONE_FREEPICK');

If you don't know what this means, it's probably easier to manually create civs like described in the step before :) .

If you have created maps before, you need to create the map-civ-entries in the database by executing the following MySQL query.

insert into phpbb_zone_map_civs select m.map_id, c.civ_id, 0.0, 0, 0, 0 from phpbb_zone_maps m join phpbb_zone_civs c;

Note, that the civ names in the SQL query look a little bit strange. That's because civs names are language variables. This way every user can have the civ names in his own language (but we only have English and German right now, feel free to add more language by adjusting lang.json).

Setting up maps

Setting up maps works pretty much the same like setting up civilisations. We don't have prepared maps for you, though, because they change pretty often. However, feel free to contact @mcepok if you still want the maps we currently use.

Activating players

To activate players, again, look at Setting up Civilisations to give yourself the needed privileges and to find the MCP. In the MCP menu, this time, stay on Player in the left menu, and enter a name (e. g. your own) in the field and click Submit

In the following screen, give the user a start rating and make sure to tick the checkbox Activate. Again, click Submit.

Do the same with some more players and if you followed everything mentioned above, you should be able to use your very own Zone :) .

Setting up a better Style

While the default prosilver Style should work, it didn't received a lot of love from us. We use the flat style for our Zone.

License

GPLv2

nczone's People

Contributors

dependabot[bot] avatar des- avatar philipphjs avatar sam152 avatar seltsamsel avatar teheru avatar zutatensuppe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nczone's Issues

Show map description when clicking on map name

  • In running matches (and maybe past matches, too) when someone clicks on the map name, an overlay / popup should open which shows the map description and map picture like on the maps page
  • This should be possible if the user has the u_zone_view_maps right only

Add a Log for manual rating changes

I think it would be very helpful to generate an automatic log-file (or topic in the forum?) where we can see all manual rating changes done by the mod interface.

No map shown

grafik

Frontend does not show maps for both current and past matches. They are shown in the api.

Make bet page great (again)

  • The bet page is missing the sort functions like the player list
  • The current default sort criteria is (bets won + 1) / (bets lost + 1), but the values are too high for this to work (it's actually the same as just the bets won rate)
    • Think of something else to sort for or just don't show players with too few bets

[+2] and [K] broken

Currently it is not possible to add two players to a match or replace one for some Frontend errors like

Unhandled promise rejection TypeError: "n.addPairPreview is undefined"

Add a view for currently drawable maps

  • There is currently no option fors normal users to view which maps are drawable
  • We need a new page in the Zone where users can view maps
  • In order to see this new page, there should be a new permission which has to be set
  • The page should contain a list of currently drawable maps (i.e. weight > 0) together with the current weight of that map

Replace integer timestamps by datetime

  • Like you can see in the screenshot below, the 'timestamp' format in migrations/install_db_create.php gets translated to an integer(11)
    image
  • We rather should use datetime fields than raw timestamps
  • Replace this in the db_create script and make the appropriate changes in the code to work with datetime

Give more users the option to kick logged in players

  • We already have a kick function at controller/api.php -> player_logout()
  • Currently there is a single mod permission acl::m_zone_login_players in order to do this
  • We need another user permission acl::u_zone_login_players (or something) for normal users in order to be able to kick other users under certain conditions
  • For now, this condition this condition should be a certain idle time of the user to be kicked
  • The actual amount of time should be configurable in the ACP

Add backend component for user based configurations

  • We already have a link called "Settings" for the user to set some preferences
  • In order to actually use that, we first need a concept and an implementation to store configurations for every user
  • This should be generic and easily extendible

Special Chars in Statistics

For special characters like "<" their html entity is displayed instead of the char.

Example: Open statictics for "Lion<3". His name is displayed as "Lion&lt;3" in the statistics window.

Support PHPBB 3.3

The only error I found when upgrading to 3.3 was the following:

TypeError: Return value of eru\nczone\utility\phpbb_util::container() must be an instance of Symfony\Component\DependencyInjection\ContainerBuilder, instance of phpbb_cache_container returned

Removing the typehint made the extension work. We could also hint phpbb_cache_container, however that would mean it wouldn't work on 3.2.

Possibility to draw maps for certain match sizes only

  • some maps make only sense to play for certain match sizes (like Jungle Warfare only works for 4vs4)
  • extend the the maps table by four fields which saves if the map can be drawn for the respective match size
  • in map configuration: give mods the possibility to adjust for which match sizes that map can be drawn (default: for all match sizes)
  • in map draw algorithm: only fetch maps which can be drawn for the actual match size

Avoid matches being drawn multiple times

  • Sometimes when the page is under load and someone is really impatient, the same matches are drawn multiple times
  • Implement something to avoid this (like read locks, but you're free to think of something else)

Avoid not possible ratings set by mods

  • When setting a players rating to 0 (which isn't possible by playing) it's not possible to change that players rating again
  • Fix this bug
  • Add the check that ratings cannot be lower than 1 to the MCP

Make maps page multilingual

  • Currently the map description has only one text for all languages (different language separated by a line)
  • Make it have multiple description for every language (atm: German, English, but make it abstract enough so other languages can be added easily)
  • If someone edits a text, make him edit his currently set language or give him a possibility to change the edited language (like a dropdown menu)

Draw mirror civs less often

  • Civs which are mirrored on maps get drawn a lot more often than other ones
  • Example: On new-chapter.eu the maps on which Spanish are mirrored make up roughly 20% of all matches, however Spanish are drawn way more often than this
  • The reason for this is probably, that if a civ which has to be mirrored gets drawn for the one team, it instantly get drawn for the other team too, no matter how unlikely it is (like for example every player of the other team has played Spanish one game earlier)
  • Think of some way to reduce this behaviour and implement it πŸ™‚ (of course, you can always talk to me for ideas)
    image

Give more users the option to add players to a match

  • We already have a replace function at controller/api.php -> add_pair_preview() and similar
  • Currently there is a single mod permission acl::m_zone_change_match in order to do this
  • We need another user permission acl::u_zone_change_match (or something) for normal users in order to be able to add other users under certain conditions
  • For now, this condition should be, that the user drawed that match

Add a 'block drawing' possibility

  • Mods should be able to disable drawing for normal users
  • This could be a (toggle) button next to the login and draw button, but you're free to do something else
  • This should be associated with a new ACL permission
  • There should be an automatic release after a certain time (configurable in ACP) to avoid accidental blocking of drawings forever

Extend map view by civ information

  • In order to do this, #11 has to be resolved
  • When clicking on a map, expand the view with all civs altogether with the information which can be set in the MCP (see below)
    image

Player can not be activated

  • Players with either special characters (like 'ΓΆ') or with a space in the name currently cannot be activated

Implement multiple pages for past matches

  • The zone/matches.php -> get_pmatches() method already has a parameter $page which defaults to 0
  • controller/api.php -> pmatches() needs a new parameter $page, also add this in config/routing.yml (don't forget to empty you cache)
  • The frontend past matches page needs a page counter at the end of the page, like '< 1 ... 4 5 6 7 8 ... 357 >'

Option to turn on / off the mChat below the Zone

  • In order to do this, we need to resolve #6 first
  • We need a setting to turn on / off the mChat below the Zone
  • This should be an option in the "Settings" page of the Zone itself
  • The default option should be, that the mChat is displayed below the Zone

Give more users the possibility to kick users from a match

  • We already have a kick function at controller/api.php -> replace_preview() and similar
  • Currently there is a single mod permission acl::m_zone_change_match in order to do this
  • We need another user permission acl::u_zone_change_match (or something) for normal users in order to be able to kick other users under certain conditions
  • For now, this condition should be, that the user drawed that match

Add 'idle since' in logged in list

  • in logged in list: add a tooltip when hovering over player name displaying the time the player has been idle
  • create a new permission which has to be set in order to see the idle time
  • also only show the idle color indicator when this permission is set only

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.