User Tools

Site Tools


projects:frontier-team-builder

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
projects:frontier-team-builder [2023/12/03 06:05] oemb1905projects:frontier-team-builder [2023/12/03 07:55] (current) oemb1905
Line 50: Line 50:
   Require valid-user   Require valid-user
      
-This takes care of password protecting the development instance and ensuring that LTS is enforced for all url requests. Nextwe need to harden the production instance and/or optionally white label itThis involves making the write.php file empty and customizing some of the other files+This takes care of password protecting the development instance and ensuring that LTS is enforced for all url requests. After thatit's now time to set permissions for the production instance. To do that, let's ensure we have some common read/write/execute permissions on the instanceThese are recommendations and took me about 1-2 hours of code review to decide a) what was needed for things to function and b) what we could restrict without harming functionality. Here'the script I came up with; make sure to adjust for the ''domain.com'' and other settings unique to your workflow:
  
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/blob/main/projects/permissions.sh|permissions.sh]]
  
- --- //[[jonathan@haacksnetworking.org|oemb1905]] 2023/12/03 04:48//+Next, we need to harden the production instance and/or optionally white-label it. To harden, we remove the development cog from footer.php and make write.php an empty file. To white-label, we edit the index, footer, and associated images. Here's the changes we made: 
 + 
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/blob/main/projects/custom/src/index.php|index.php]] 
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/blob/main/projects/custom/src/footer.php|footer.php]] 
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/blob/main/projects/custom/src/data/write.php|write.php]] 
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/tree/main/projects/custom/src/img|img]] 
 + 
 +Now, the repository also has the ability to store overrides on moves and custom meta groups, however, this is optional and more of a choice specific to each meta development team.  
 + 
 +------------------------------------------- 
 + 
 +At this point, the development and production virtual hosts are created, secured sufficiently, and/or optionally customized. From this point forward, the tutorial is no longer about how to set up the instances, but rather how to leverage those instances to create metas on the development instance and then migrate those development changes to production. In order to do this, one needs to have detailed understanding of how the upstream code from pvpoke.com works. For me, this took weeks of studying the code with a colleague of mine at Antimatter.GG gaming, meetings with the head developer of pvpoke.com, and a bit of trial and error. Once that was done, I created two scripts. The first one creates the pre-requisite back-end files needed for the creation of a new meta on the development instance, and the second one merges the metas you created in development back to production while preserving aforementioned white-labeling and hardening. Below, I've included the wiki post KakunaMatata made about how his stack works, the pre-requisite file creation script, and the merge to production script: 
 + 
 +  *[[https://github.com/pvpoke/pvpoke/wiki/Creating-New-Cups-&-Rankings|Creating New Cups]] 
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/blob/main/projects/poke-create-files.sh|poke-create-files.sh]] 
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/blob/main/projects/poke-rebuild-production.sh|poke-rebuild-production.sh]] 
 + 
 +The scripts above assume a detailed understanding of the upstream code. The scripts above create the files needed for metas and migrate those from development to production. There are micro tasks involved that require independent study and expertise and are presumed levels of understanding for the intended audience. At this point in the tutorial, you should know how to create a development and production instance, create metas within the development instance, and migrate those changes to production. 
 + 
 +------------------------------------------- 
 + 
 +At this point, we now need to know how to pull changes from upstream. If you are not familiar with the community, you might be wondering what changes we would be pulling. In addition to coding and/or optimizations that KakunaMatata might make to the stack, he also pushes changes that are global to the game including but not limited to move additions, move nerfs, move buffs, and/or other changes. These changes impact the relative ranking and simulated combinations that the meta and battle party features of the upstream project and fork utilize. In short, since the development instance is a git repository, teams need to pull the changes, resolve conflicts, and then merge those to production. Here are the steps from top to bottom for creating a meta, and then later updating the instance to reflect the new changes to the underlying Pokemon moves. 
 + 
 +  *[[https://repo.haacksnetworking.org/haacknet/haackingclub/-/blob/main/projects/UPDATING.md|UPDATING.md]] 
 + 
 +------------------------------------------- 
 + 
 +This should help any teams desiring to make a development and production instance and/or fork of PvPoke.com. Now, some meta developers might want to just create a locally hosted version and want to know how to create metas with as little fuss and muss as possible. If that's so, then install the latest version of pvpoke.com to your localhost webroot. Once that's done, change, create, and/or edit the following files according to how pvpoke.com works: 
 + 
 +  src/data/gamemaster/cups/name.json 
 +  src/data/gamemaster/formats.json [make sure no comma at end] 
 +  src/data/rankings/name/attackers/rankings-1500.json 
 +  src/data/rankings/name/chargers/rankings-1500.json 
 +  src/data/rankings/name/closers/rankings-1500.json 
 +  src/data/rankings/name/consistency/rankings-1500.json 
 +  src/data/rankings/name/leads/rankings-1500.json 
 +  src/data/rankings/name/overall/rankings-1500.json 
 +  src/data/rankings/name/switches/rankings-1500.json 
 +  src/data/groups/name/name.json [just put in top 100 from a simple sim] 
 +  src/data/overrides/name/1500.json [just leave [] at start] 
 + 
 +Once these are created, do the following in the web GUI (under the development cog): 
 + 
 +  - compile (with group put in from step 10 above) 
 +  - override moves, import movesets, copy json to 11 above 
 +  - compile again 
 +  - ranker, simulate 
 +  - rankersandbox, simulate 
 + 
 +Bear in mind, these are highly condensed instructions which assume knowledge of the underlying upstream code, familiarity with KakunaMatata's wiki and meta development steps, and more. If you have questions, just reach out! Happy to help! Oh yeah, our production instance is over here: 
 + 
 +  *[[http://ranks.pvpfrontier.gg|Frontier Team Builder]] 
 +   
 +------------------------------------------- 
 + 
 +The next task is to make a php/json front end GUI version that allows our meta team to do all this with web-based tools! 
 + 
 + --- //[[jonathan@haacksnetworking.org|oemb1905]] 2023/12/03 07:40//
projects/frontier-team-builder.1701583524.txt.gz · Last modified: 2023/12/03 06:05 by oemb1905