Jump to content

Recommended Posts

In the buildInstructions (the page with the dependencies) there are commands below to download and build svn (subversion), we highly recommend using this when making changes. When that is done (and that might take a while) you can search in the svn folder to the brit_blacksmith file and make the changes in there. Then when doing svn diff (or whatever it is on windows) you can see what you changed. By putting that on phabricator we can start reviewing (there is also an option to use arc and avoid the svn diff stuff)

Link to post
Share on other sites
  • Replies 265
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

You have access to the following functions in JS (see JSInterface_ConfigDB.cpp): bool Engine.ConfigDB_HasChanges(namespace) bool Engine.ConfigDB_SetChanges(namespace, bool) string Engine.Conf

That is defined in the simulation templates ( http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/templates/ ) F.e. the default attack of the archer is defined to

Yes. It's .DELETED not .DELETE I believe. Also don't forget to put text in those files

Posted Images

Thanks; I've now built the game, changed those files, and typed svn diff. Now, how to put it on phabricator? (I've seen https://trac.wildfiregames.com/wiki/Phabricator#UsingDifferential but I'm unsure how to proceed exactly.)

 

PS Windows is too difficult for me; I use Fedora instead :) And although I've never used svn before, I am willing to learn, and would like “to get in touch with” it.

Link to post
Share on other sites

It's probably quite easy, but I have no idea what to do when https://secure.phabricator.com/book/phabricator/article/arcanist/ states:

Quote

 

Now add some_install_path/arcanist/bin/ to your PATH environment variable. When you type "arc", you should see something like this:


Usage Exception: No command provided. Try 'arc help'.

 

When I type arc, I get:

bash: arc: command not found...
Install package 'arc' to provide command 'arc'? [N/y]

And in this case, arc is the ARC file archive manager, which I believe is something different than the phacility's arcanist.

 

Link to post
Share on other sites

Thanks. So I added

PATH=$PATH:~/0ad/arcanist/bin/

into the .bash_profile file, which didn't work initially, but works now after restarting my computer. arc help now works, and I've used arc install-certificate and followed its instructions. Now, what's the next step?

If I type svn diff, I get the changes I made in the blacksmith files, so this seems to work.

If I type arc diff, I get:

Quote

 Exception
Failed to load class or interface 'SimpleXMLElement': the class or interface 'SimpleXMLElement' is not defined in the library map for any loaded phutil library.

If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded `phabricator` without upgrading `libphutil`, or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.

If you are a developer and this symbol was recently added or moved, your library map may need to be rebuilt. You can rebuild the map by running 'arc liberate'. For more information, see:

https://secure.phabricator.com/book/phabcontrib/article/adding_new_classes/
(Run with `--trace` for a full exception trace.)

 

Edited by Nescio
Link to post
Share on other sites

27. Maybe I'll try the git mirror instead.

 

28. Something else, how to solve the following error message?

Quote

ERROR: JavaScript error: simulation/ai/common-api/entity.js line 313 ReferenceError: bonusesClasses is not defined m.Template<.getMultiplierAgainst@simulation/ai/common-api/entity.js:313:1 m.getMaxStrength@simulation/ai/petra/entityExtend.js:28:12 m.HQ.prototype.findBestTrainableUnit/<@simulation/ai/petra/headquarters.js:570:18 m.HQ.prototype.findBestTrainableUnit@simulation/ai/petra/headquarters.js:554:2 m.AttackPlan.prototype.trainMoreUnits@simulation/ai/petra/attackPlan.js:557:19 m.AttackPlan.prototype.updatePreparation@simulation/ai/petra/attackPlan.js:440:4 m.AttackManager.prototype.update@simulation/ai/petra/attackManager.js:140:21 m.HQ.prototype.update@simulation/ai/petra/headquarters.js:2286:3 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:119:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2

 

Link to post
Share on other sites

don't know if the path you added is correct it should be the path to where you putted the arcanist files anyway getting a diff with arc is done by

arc diff --preview

then (after pressing "y") a link to a webpage should pop up, from there you can make a new revision with the webgui.

However this might not fix that (arc) error, maybe run arc liberate

 

28: Regarding the bonusClasses error looks like an ai issue

Link to post
Share on other sites

The path I entered in the .bash_profile file is ~/0ad/arcanist/bin/ because I've located both the arcanist and the libphutil repositories inside ~/0ad/

If I type arc diff --preview I get the same as with just arc diff:

 Exception 
Failed to load class or interface 'SimpleXMLElement': the class or interface 'SimpleXMLElement' is not defined in the library map for any loaded phutil library.

If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded `phabricator` without upgrading `libphutil`, or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.

If you are a developer and this symbol was recently added or moved, your library map may need to be rebuilt. You can rebuild the map by running 'arc liberate'. For more information, see:

https://secure.phabricator.com/book/phabcontrib/article/adding_new_classes/
(Run with `--trace` for a full exception trace.)

And if I type arc liberate I get:

Usage Exception: Specified directory contains more than one libphutil library. Use a more specific path.

 

 

28. Yes, I understand that, however, I haven't touched any of the AI files.

Edited by Nescio
Link to post
Share on other sites

Yes, I did successfully run arc install-certificate and arc upgrade a few hours ago. And it seems there are two .arcconfig files, one in ~/0ad/ :

{
  "phabricator.uri" : "https://code.wildfiregames.com/",
  "repository.callsign" : "P"
}

and one in ~/0ad/arcanist/ :

{
  "phabricator.uri": "https://secure.phabricator.com/",
  "load": [
    "src/"
  ],
  "history.immutable": false
}

 

EDIT: the .arcrc file is located in ~/

Edited by Nescio
.arcrc
Link to post
Share on other sites

Yes, I'm running from ~/0ad/

OK, I've run arc install-certificate again, no difference, arc diff --preview still gives the same exception message.

If I run arc diff --preview --trace instead, I get the longer message:

 ARGV  '/home/b/0ad/arcanist/bin/../scripts/arcanist.php' 'diff' '--preview' '--trace'
 LOAD  Loaded "phutil" from "/home/b/0ad/libphutil/src".
 LOAD  Loaded "arcanist" from "/home/b/0ad/arcanist/src".
Config: Reading user configuration file "/home/b/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/home/b/0ad/.arcconfig".
Working Copy: Path "/home/b/0ad" is part of `svn` working copy "/home/b/0ad".
Working Copy: Project root is at "/home/b/0ad".
Config: Did not find local configuration at "/home/b/0ad/.svn/arc/config".
>>> [0] <conduit> user.whoami() <bytes = 117>
>>> [1] <http> https://code.wildfiregames.com/api/user.whoami
<<< [1] <http> 2,125,115 us
<<< [0] <conduit> 2,126,337 us
>>> [2] <exec> $ svn --xml status
<<< [2] <exec> 199,777 us

[2017-09-07 19:22:04] EXCEPTION: (PhutilMissingSymbolException) Failed to load class or interface 'SimpleXMLElement': the class or interface 'SimpleXMLElement' is not defined in the library map for any loaded phutil library.

If you are not a developer, this almost always means that a library is out of date. For example, you may have upgraded `phabricator` without upgrading `libphutil`, or vice versa. It might also mean that you need to restart Apache or PHP-FPM. Make sure all libraries are up to date and all services have been restarted.

If you are a developer and this symbol was recently added or moved, your library map may need to be rebuilt. You can rebuild the map by running 'arc liberate'. For more information, see:

https://secure.phabricator.com/book/phabcontrib/article/adding_new_classes/ at [<phutil>/src/__phutil_library_init__.php:25]
arcanist(head=master, ref.master=cbc785ddce71), phutil(head=master, ref.master=0cd92b1ff5c4)
  #0 __phutil_autoload(string)
  #1 spl_autoload_call(string) called at [<arcanist>/src/repository/api/ArcanistSubversionAPI.php:78]
  #2 ArcanistSubversionAPI::getSVNStatus() called at [<arcanist>/src/repository/api/ArcanistSubversionAPI.php:54]
  #3 ArcanistSubversionAPI::buildUncommittedStatus() called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:142]
  #4 ArcanistRepositoryAPI::getUncommittedStatus() called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:211]
  #5 ArcanistRepositoryAPI::getUncommittedPathsWithMask(integer) called at [<arcanist>/src/repository/api/ArcanistRepositoryAPI.php:186]
  #6 ArcanistRepositoryAPI::getIncompleteChanges() called at [<arcanist>/src/workflow/ArcanistWorkflow.php:841]
  #7 ArcanistWorkflow::requireCleanWorkingCopy() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:691]
  #8 ArcanistDiffWorkflow::runDiffSetupBasics() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:467]
  #9 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

 

Link to post
Share on other sites

are you using arc with a svn checkout? so something you downloaded with `svn co http://svn.wildfiregames.com/public/ps/trunk/ 0ad`? otherwise run that (in a new directory so things don't get messy) and see https://trac.wildfiregames.com/wiki/BuildInstructions for building and stuff.

If you did download svn do `svn up` until it doesn't download any more files.

Link to post
Share on other sites

Yes, I did. After running svn up:

Updating '.':
At revision 20128.

It makes no difference, arc diff --preview still returns the same message.

It's probably something very easy I've overlooked somewhere, although I'm completely at a loss what it could be ...

Link to post
Share on other sites

Great, many thanks, “sudo yum install php-xml” solved the issue, and “arc diff --preview” seems to work now, finally!

Quote

 

Linting...
 LINT OKAY  No lint problems.
Running unit tests...
No unit test engine is configured for this project.
 SKIP STAGING  Phabricator does not support staging areas for this repository.
Created a new Differential diff:
        Diff URI: https://code.wildfiregames.com/differential/diff/3568/

Included changes:
  M       binaries/data/mods/public/simulation/templates/structures/brit_blacksmith.xml
  M       binaries/data/mods/public/simulation/templates/structures/gaul_blacksmith.xml
  M       binaries/data/mods/public/simulation/templates/units/maur_elephant_archer_b.xml

 

Now let's see what the next step is and where I encounter the next hurdle :)
 

 

PS Maybe you could add php-xml in the list of prerequisites under https://trac.wildfiregames.com/wiki/BuildInstructions#Fedora ? That would have saved a lot of time and trouble.

Edited by Nescio
ce
Link to post
Share on other sites

The last step (following the url produced by “arc diff --preview”) was actually quite easy, although I overlooked it initially. Hopefully I've correctly filled in all required fields. Anyway, a new diff was produced:

https://code.wildfiregames.com/D887

Now I suppose I just have to wait to get it reviewed and accepted or rejected.

 

Meanwhile, is it possible to make another diff proposal, independently of this one? If so, how do I use arc to ignore the changes of D887 and focus on the next changes? Something I'd like to do is to give healers a + shaped selection marker, so I've added a few lines in binaries/data/mods/public/simulation/templates/template_unit_support_healer.xml and created new files in binaries/data/mods/public/art/textures/selection/plus (which arc diff proposes to ignore); now, how to proceed?

Link to post
Share on other sites
47 minutes ago, Nescio said:

The last step (following the url produced by “arc diff --preview”) was actually quite easy, although I overlooked it initially. Hopefully I've correctly filled in all required fields. Anyway, a new diff was produced:

https://code.wildfiregames.com/D887

Now I suppose I just have to wait to get it reviewed and accepted or rejected.

 

Meanwhile, is it possible to make another diff proposal, independently of this one? If so, how do I use arc to ignore the changes of D887 and focus on the next changes? Something I'd like to do is to give healers a + shaped selection marker, so I've added a few lines in binaries/data/mods/public/simulation/templates/template_unit_support_healer.xml and created new files in binaries/data/mods/public/art/textures/selection/plus (which arc diff proposes to ignore); now, how to proceed?

you can upload more proposals independently of this one.  You should be sure to remove all the previous changes you made to the svn version  by typing  in the terminal:

svn revert -R ~/0ad/binaries/data/mods/public

in the case you added new files, you should manually remove them by typing:

svn remove path/fileName

Arc is  a powerful tool but it is easy to upload unwanted stuff ( it happens to me quite often :rolleyes: )

 

EDIT:  I wonder if this thread could be pinned and perhaps used as official question/ask  thread

Edited by Grugnas
Link to post
Share on other sites
On 08/09/2017 at 0:05 PM, Grugnas said:

svn revert -R ~/0ad/binaries/data/mods/public

Thanks, this was what I needed! New revisions added:

https://code.wildfiregames.com/D888
https://code.wildfiregames.com/D889
https://code.wildfiregames.com/D890
https://code.wildfiregames.com/D892
https://code.wildfiregames.com/D896

More to follow later :)

Edited by Nescio
ce
Link to post
Share on other sites

Just some extension on Grugnas comment:

svn revert -R ~/0ad/binaries/data/mods/public

this will only revert the public mod changes, so if you change something in f.e. the source folder, it won't be reverted this can be fixed by doing

svn revert -R ~/0ad/

instead.

Also arc can download and apply patches (so if you get a review and there need to be some more changes f.e.) use `arc patch Dn` for that ("n" is a number).

Also arc diff (or svn diff) ignores untracked files (so files that show up with a ? when pressing svn status), too add them (so arc will include them) use `svn add path/to/filename` or remove things like grugnas said with `svn remove path/to/filename`. Do notice that arc patch does include new files (don't know if it also remove ones), but svn revert doesn't delete the files!! however the files will be marked as untracked in svn.

Link to post
Share on other sites

27. Now I believe I understand how to add, update, and revert diffs on phabricator; to summarize (as a reference for future use for myself):

Start with:

svn up

Optionally, to load an existing diff (e.g. D888), type:

arc patch D888

And also optionally, to load a previous version (e.g. diff 3575), type:

arc patch --diff 3575

Make some changes. Use “svn add”, “svn rm”, and “svn mv” when adding, deleting, and renaming files. Then:

svn diff
arc diff --preview

Follow the url produced in the terminal, click to add it to a (new or existing) patch, and fill in the required fields (title, summary, test). Finish with:

svn revert -R ~/0ad/binaries/data/mods/public

If you're inside the 0ad/ folder, you can also use:

svn revert -R *

[EDIT]: if you get a 'svn:eol-style' or 'svn:mime-type' error exception for a certain `file.ext`, run:

svn propset svn:eol-style native file.ext
svn propset svn:mime-type text/plain file.ext
svn propset svn:mime-type image/png file.png
svn propset svn:mime-type text/xml file.xml

Let's leave “how to start contributing?” for now and return to “how to start modifying?” :)

 

 

24. How large are map sizes?

 

 

28. Any suggestions how to solve the following AI error? (No, I didn't touch any of the AI files. I'm not sure what causes it, but when it starts, this error message continues uninterruptedly, which is quite annoying and also seems to slow down the game.)

Quote

ERROR: JavaScript error: simulation/ai/common-api/entity.js line 313 ReferenceError: bonusesClasses is not defined m.Template<.getMultiplierAgainst@simulation/ai/common-api/entity.js:313:1 m.getMaxStrength@simulation/ai/petra/entityExtend.js:28:12 m.HQ.prototype.findBestTrainableUnit/<@simulation/ai/petra/headquarters.js:570:18 m.HQ.prototype.findBestTrainableUnit@simulation/ai/petra/headquarters.js:554:2 m.AttackPlan.prototype.trainMoreUnits@simulation/ai/petra/attackPlan.js:557:19 m.AttackPlan.prototype.updatePreparation@simulation/ai/petra/attackPlan.js:440:4 m.AttackManager.prototype.update@simulation/ai/petra/attackManager.js:140:21 m.HQ.prototype.update@simulation/ai/petra/headquarters.js:2286:3 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:119:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2

 

 

29. Where to post feature requests? Technologies can supersede each other; it would be nice if this would also be possible for auras.

 

 

30. By default, individual basic, advanced, and elite units are distinguished by the chevrons overlaid on the unit icon (rank1 is one bronze, rank2 two silver, rank3 three gold). Because I've replaced the b/a/e system with ranks 0 to 12, I've also created new chevron icons (attached; located under /art/textures/ui/sessions/icons/ ) to match those. Now, which files do I have to edit to properly display them?rank0.png

rank1.png rank2.pngrank3.pngrank4.pngrank5.pngrank6.pngrank7.pngrank8.pngrank9.pngrank10.pngrank11.pngrank12.png

Edited by Nescio
ce
  • Like 1
Link to post
Share on other sites

27: a few comments: `svn diff` is just putting the diff in your command line, which is useful for checking for typo's, but there is no strict need doing it when pushin patches to phab.

 

svn revert -R ~/0ad/

should be enough and actually better when reverting

 

svn mv indeed broken with phab/arc so its not you

28. after a little deeper look the error is fooling me... is this the exact error you get in the commandline when using current svn? also pinging our ai dev @mimo

29. when already having a patch do it on phab by creating a new revision. Otherwise make a ticket on trac (but ofc search if there isn't one already for the same thing)

30.12 ranks XD, i guess most files in gui/session, single_details_area.xml has the xml object definition didn't look where the correct image is attached to it (it should be some call to Engine.GetGuiObjectByName("rankIcon"), use grep to find it, should be in the gui/session directory)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...