Page MenuHomeWildfire Games
Feed All Stories

Jun 19 2019

Nescio added a comment to D1957: Basic implementation of extended restricted bartering support..

If you select food to sell, you should get a number on the coin? If that is not the case, please report :)

You're right, I mixed up, selling works fine. My problem is actually with the buying part. Instead of bartering a fixed 100 silver and getting +409 food in return, I want to buy 100 food and pay only the silver equivalent.
For comparison, if you go to the supermarket, you don't want to know how much bread you can get with €100, you want to know how much one bread will cost you.
Basically, there is a fundamental difference between a barter-based economy and a currency-based economy.

Jun 19 2019, 8:46 PM
Freagarach added a comment to D1957: Basic implementation of extended restricted bartering support..
In D1957#83317, @Nescio wrote:

What I don't know for sure is what causes the errors (D1846, D1957, me including them, some other file in my mod, or something missing in A23 compared to A24, something else).

Thanks for the report! I reproduced this and found the errors. Mentioned in D1846.

Jun 19 2019, 8:35 PM
Freagarach added a comment to D1846: Adds a "properties"-property to resources and let mods be able to prevent resources from being bartered, traded and/or tributed..
In D1957#83317, @Nescio wrote:
  • the barter and trade window width apparently only takes the tradable resources into account and overlooks the barterable resources need to be displayed as well

Overlooked by me ;)
We need to check whichever is largest.

Jun 19 2019, 8:24 PM
Nescio added a comment to D1957: Basic implementation of extended restricted bartering support..

Alternatively, keep the resource amounts fixed at 100, and display the currency equivalents:

     || 100 food  | 100 wood  | 100 stone | 100 iron
buy  || −a silver | −b silver | −c silver | −d silver
sell || +w silver | +x silver | +y silver | +z silver
Jun 19 2019, 8:20 PM
Nescio added a comment to D1957: Basic implementation of extended restricted bartering support..

So I tried out incorporating D1846 and D1957 into my 0abc mod; silver has
"properties": [ "barterable", "currency", "tradable", "tributable" ],
the other four resources only [ "barterable", "tributable" ]. Also, silver, food, wood, stone, and metal have a "truePrice" of respectively 100, 20, 40, 60, 80 (to correspond to the fact they have different gather rates).
When launching a game, building a market, and opening the trade window, this is the result:


Most things seem to work (thank you!), but a few things go wrong:

  • the -100 numbers on top of the sell resources are not really meaningful; what we actually want to know is how much silver we get if we sell 100 of a resource
  • the barter and trade window width apparently only takes the tradable resources into account and overlooks the barterable resources need to be displayed as well
  • the position of the currency resource silver is a bit odd; perhaps we should have three rows: select currency (in case there are more than one), sell resource for currency, buy resource with currency
  • and a js error:

ERROR: JavaScript error: simulation/ai/petra/diplomacyManager.js line 412 SyntaxError: missing ; before statement InitGame@simulation/helpers/InitGame.js:57:1
ERROR: Failed to load script simulation/ai/petra/diplomacyManager.js
The line in question is:

requiredTribute = gameState.ai.HQ.pickMostNeededResources(gameState).find(res => tributableResources.indexOf(res.type) != -1));

What I don't know for sure is what causes the errors (D1846, D1957, me including them, some other file in my mod, or something missing in A23 compared to A24, something else).

Jun 19 2019, 8:06 PM
Vulcan added a comment to D1971: Support attack-ground for ranged units..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 8:03 PM
Freagarach updated the diff for D1971: Support attack-ground for ranged units..

Proper checking for Vector3D.

Jun 19 2019, 8:01 PM
Freagarach added inline comments to D1971: Support attack-ground for ranged units..
Jun 19 2019, 7:58 PM
Polakrity added inline comments to D1993: petra: Fix all ESLint and JSHint warnings.
Jun 19 2019, 7:44 PM
Vulcan added a comment to D1973: Support friendly fire for projectile attacks..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 7:24 PM
Freagarach updated the diff for D1973: Support friendly fire for projectile attacks..
  • Created FF under "Projectile".
    • Updated templates accordingly.
  • Refactored splash data.
    • Updated tests accordingly.
Jun 19 2019, 7:23 PM
Vulcan added a comment to D2001: [AI] Small cleanup in defenseManager.

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 7:09 PM
Silier updated the diff for D2001: [AI] Small cleanup in defenseManager.

comments

Jun 19 2019, 7:07 PM
Stan added a comment to D1993: petra: Fix all ESLint and JSHint warnings.

Hoping to see this land relatively soon to avoid merge conflicts, after that I'll move on to the next area to lint :)

Jun 19 2019, 6:20 PM
Krinkle added a comment to D1993: petra: Fix all ESLint and JSHint warnings.

Hoping to see this land relatively soon to avoid merge conflicts, after that I'll move on to the next area to lint :)

Jun 19 2019, 6:04 PM
Krinkle added a reviewer for D1993: petra: Fix all ESLint and JSHint warnings: Restricted Owners Package.
Jun 19 2019, 6:03 PM
Stan added inline comments to D1971: Support attack-ground for ranged units..
Jun 19 2019, 5:31 PM
Vulcan added a comment to D1971: Support attack-ground for ranged units..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 5:08 PM
Freagarach updated the diff for D1971: Support attack-ground for ranged units..

Some rather minor fixes.

Jun 19 2019, 5:06 PM
wraitii added inline comments to D2001: [AI] Small cleanup in defenseManager.
Jun 19 2019, 5:01 PM
Freagarach added inline comments to D1971: Support attack-ground for ranged units..
Jun 19 2019, 4:20 PM
Vulcan added a comment to D2001: [AI] Small cleanup in defenseManager.

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 3:32 PM
Silier updated the diff for D2001: [AI] Small cleanup in defenseManager.
Jun 19 2019, 3:31 PM
Freagarach added inline comments to D1971: Support attack-ground for ranged units..
Jun 19 2019, 2:57 PM
wraitii added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#83264, @Nescio wrote:

By the way, <FriendlyFire> is wrapped inside the <Splash> node, but shouldn't it be applicable to non-splash attacks as well? E.g. an archer shoots an arrow at an enemy, but the projectile spread causes it to land on another unit of yours right next to the target, then it would be nice to have if that one was wounded, for realism.

Jun 19 2019, 2:17 PM
Nescio added a comment to D1950: Create "Damage"-container for damage types in templates..

By the way, <FriendlyFire> is wrapped inside the <Splash> node, but shouldn't it be applicable to non-splash attacks as well? E.g. an archer shoots an arrow at an enemy, but the projectile spread causes it to land on another unit of yours right next to the target, then it would be nice to have if that one was wounded, for realism.

Jun 19 2019, 2:12 PM
wraitii added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#83259, @Nescio wrote:

<Delay> could also make sense for melee attacks, e.g. a unit who plants bombs.

That would need a "Projectile" as well right? Nevertheless I do agree that "Delay" could be useful.

Jun 19 2019, 1:46 PM
Freagarach added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#83259, @Nescio wrote:

<Delay> could also make sense for melee attacks, e.g. a unit who plants bombs.

That would need a "Projectile" as well right? Nevertheless I do agree that "Delay" could be useful.

Jun 19 2019, 1:09 PM
Nescio accepted D1995: Fix missing "Damage"-node in examples..
Jun 19 2019, 12:51 PM
Nescio added a comment to D1950: Create "Damage"-container for damage types in templates..

<Delay> could also make sense for melee attacks, e.g. a unit who plants bombs.

Jun 19 2019, 12:50 PM
bb added a comment to D2002: Generalise attack types..

For reference this was a WIP while I was working on the full system https://github.com/0ad/0ad/compare/master...bb-bb:t252_secondAttack. I have a little better version iirc, but that needs a rebase before uploading.

Jun 19 2019, 11:36 AM
Stan added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#83214, @Nescio wrote:

Ideally different projectiles would also be able to have different damage, therefore what is eventually desirable is support for multiple ranged attacks, e.g. a fortress able to fire both arrows (long range, low damage) and javelins (shorter range, higher damage).

Jun 19 2019, 11:34 AM
wraitii added a comment to D1950: Create "Damage"-container for damage types in templates..

Easier with D2002?

Jun 19 2019, 11:29 AM
wraitii added a comment to D2002: Generalise attack types..
In D2002#83250, @bb wrote:

I indeed have a branch for the secondary attacks, which also generalizes the attackTypes. That branch is pretty much a more or less complete version of this revision, I will update that branch to current svn soon, but that will come after my exams of next week...

Jun 19 2019, 11:24 AM
Freagarach added a comment to D2002: Generalise attack types..
In D2002#83250, @bb wrote:

(,,,) which also generalizes the attackTypes. (...)

Hmm, I did not get that from your diff. I might overlook it I guess.
Feel free to take over this diff if you want!

Jun 19 2019, 11:20 AM
bb added a reviewer for D2002: Generalise attack types.: bb.
Jun 19 2019, 11:05 AM
bb added a comment to D2002: Generalise attack types..

I indeed have a branch for the secondary attacks, which also generalizes the attackTypes. That branch is pretty much a more or less complete version of this revision, I will update that branch to current svn soon, but that will come after my exams of next week...

Jun 19 2019, 11:05 AM
Nescio added a comment to D1950: Create "Damage"-container for damage types in templates..

Please correct me if I'm mistaken, but currently ranged attack has everything melee attack has, plus <Delay>, <ElevationBonus>, <Projectile>, and <Splash>.

Jun 19 2019, 11:02 AM
Freagarach added a comment to D1950: Create "Damage"-container for damage types in templates..

The correct way forward is probably to define the common schema of melee attacks and projectile stuff somewhere, then re-use that, instead of duplicating the schema so much.

Easier with D2002?

Jun 19 2019, 10:57 AM
Nescio added a comment to D2002: Generalise attack types..

Thank you for the clarification, that sounds great!

Jun 19 2019, 10:52 AM
wraitii updated the Trac tickets for D2002: Generalise attack types..
Jun 19 2019, 10:52 AM
wraitii added a comment to D2002: Generalise attack types..
In D2002#83231, @Nescio wrote:

What does it do? Won't different attacks conflict? And how do units know which one to select?

Jun 19 2019, 10:51 AM
Freagarach updated the Trac tickets for D2002: Generalise attack types..
Jun 19 2019, 10:49 AM
Freagarach added a comment to D2002: Generalise attack types..
In D2002#83231, @Nescio wrote:

What does it do? Won't different attacks conflict? And how do units know which one to select?
Also, wasn't @bb working on something similar?

According to the ticket, @bb was working on it three years ago. I think this needs to be seen in conjunction with D1595 and #252.

Jun 19 2019, 10:48 AM
wraitii added a comment to D1950: Create "Damage"-container for damage types in templates..

So we need a "Range" node in the "Attack" *and* a "Range" in the "Projectile"?

We would

But currently the chech whether a projectile can be launched is performed only once, so we would need a check per projectile I guess?

Yes it's a paradigm change, introduced mostly by D1171 a said above. Launching multiple projectiles is unsupported, but it could/should be added. But I think it'd be better first to make Projectile handle more things.

Jun 19 2019, 10:47 AM
Freagarach added a comment to D1950: Create "Damage"-container for damage types in templates..

Forgot about melee attacks... But my above point still stands that we might want attacks that generate more than one projectile, and then these projectiles could have different range behaviour. We might need range at two different levels again.

I suggested it because most mods are based on A23, this patch has already broken support for them, requiring them to be updated when A24 is released, so now would be a good time for regrouping other elements.

Very good point. Might be worth it indeed.

So we need a "Range" node in the "Attack" *and* a "Range" in the "Projectile"?
But currently the check whether a projectile can be launched is performed only once, so we would need a check per projectile I guess?

Jun 19 2019, 10:43 AM
Nescio updated subscribers of D2002: Generalise attack types..

What does it do? Won't different attacks conflict? And how do units know which one to select?
Also, wasn't @bb working on something similar?

Jun 19 2019, 10:41 AM
wraitii added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#83214, @Nescio wrote:

Ideally different projectiles would also be able to have different damage, therefore what is eventually desirable is support for multiple ranged attacks, e.g. a fortress able to fire both arrows (long range, low damage) and javelins (shorter range, higher damage).

Jun 19 2019, 10:40 AM
Vulcan added a comment to D2002: Generalise attack types..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 10:39 AM
Freagarach created D2002: Generalise attack types..
Jun 19 2019, 10:37 AM
Nescio added a comment to D1950: Create "Damage"-container for damage types in templates..

Ideally different projectiles would also be able to have different damage, therefore what is eventually desirable is support for multiple ranged attacks, e.g. a fortress able to fire both arrows (long range, low damage) and javelins (shorter range, higher damage).

Jun 19 2019, 10:33 AM
wraitii added a comment to D1950: Create "Damage"-container for damage types in templates..

Forgot about melee attacks... But my above point still stands that we might want attacks that generate more than one projectile, and then these projectiles could have different range behaviour. We might need range at two different levels again.

Jun 19 2019, 10:22 AM
Stan added inline comments to D1971: Support attack-ground for ranged units..
Jun 19 2019, 10:21 AM
Freagarach added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#83191, @Nescio wrote:

I suggested it because most mods are based on A23, this patch has already broken support for them, requiring them to be updated when A24 is released, so now would be a good time for regrouping other elements.

Partly agreed, but (, I think,) modders are already converting their mods based on SVN.

Jun 19 2019, 10:20 AM
LordGood committed rP22392: Teak, dragon bamboo, scaled down some baked normal and ao maps larger than the….
Teak, dragon bamboo, scaled down some baked normal and ao maps larger than the…
Jun 19 2019, 10:17 AM
Nescio added a comment to D1950: Create "Damage"-container for damage types in templates..

Melee attack also has range, but no projectiles. You're right, it has no immediate gameplay effects, it would just be a more logical grouping in the xml files. Currently there are already separate nodes for <Bonuses>, <Damage>, <Projectile>, <RangeOverlay>, and <Splash>. I believe <RangeOverlay> is based on <MaxRange> and <MinRange>, so it would make sense to put those (and <ElevationBonus>) inside the same node, and rename it to simply <Range>.
I suggested it because most mods are based on A23, this patch has already broken support for them, requiring them to be updated when A24 is released, so now would be a good time for regrouping other elements.

Jun 19 2019, 10:15 AM
Freagarach added a comment to D1950: Create "Damage"-container for damage types in templates..

One question is what to do with range - range implies projectile, should range be moved to the projectile? Possibly if we want one attack to send multiple projectiles with different behaviour. So maybe then do it. If it's just to group with no gameplay impact, I don't think it's worth breaking mod compatibility.

Jun 19 2019, 10:12 AM
wraitii added inline comments to D1970: Flee away from the attacker's position rather than the attacker.
Jun 19 2019, 9:56 AM
wraitii added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#82844, @Nescio wrote:

Thank you for this patch. Next question, should we also have a <Range> node? E.g.:

That is up to the dev's I guess. I think it is pretty, but is it useful? Useful enough to agitate the modders again?

Jun 19 2019, 9:54 AM
Freagarach added a comment to D1950: Create "Damage"-container for damage types in templates..
In D1950#82844, @Nescio wrote:

Thank you for this patch. Next question, should we also have a <Range> node? E.g.:

That is up to the dev's I guess. I think it is pretty, but is it useful? Useful enough to agitate the modders again?

Jun 19 2019, 9:48 AM
Vulcan added a comment to D1971: Support attack-ground for ranged units..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 9:41 AM
Freagarach updated the diff for D1971: Support attack-ground for ranged units..
  • Simplified "FaceTowardsTarget" function.
  • Generalised "ShouldChaseTarget" function.
Jun 19 2019, 9:39 AM
Freagarach added inline comments to D1970: Flee away from the attacker's position rather than the attacker.
Jun 19 2019, 9:10 AM
wraitii added inline comments to D1938: Easier introduction of new damage types..
Jun 19 2019, 9:04 AM
Vulcan added a comment to D1995: Fix missing "Damage"-node in examples..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 8:17 AM
Freagarach updated the diff for D1995: Fix missing "Damage"-node in examples..

"DeathDamage.js".
@Stan I do not think the lowercase damage is a typo, see comment at commit.

Jun 19 2019, 8:16 AM
Vulcan added a comment to D1938: Easier introduction of new damage types..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 8:11 AM
Freagarach updated the diff for D1938: Easier introduction of new damage types..
  • this.Config.DamageTypeFactors.
  • Added missing "/".
Jun 19 2019, 8:09 AM
Vulcan added a comment to D1955: Support "phenotype"-tag in VisualActor..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 8:02 AM
Freagarach updated the diff for D1955: Support "phenotype"-tag in VisualActor..
  • Updated "Sound.js".
  • All "gender" -> "phenotype".
Jun 19 2019, 7:59 AM
Silier updated the summary of D2001: [AI] Small cleanup in defenseManager.
Jun 19 2019, 7:55 AM
Silier added a comment to D1938: Easier introduction of new damage types..

some comments

Jun 19 2019, 7:44 AM
Vulcan added a comment to D1938: Easier introduction of new damage types..

Successful build - Chance fights ever on the side of the prudent.

Jun 19 2019, 7:38 AM
Freagarach abandoned D1936: Load damageTypes from "simulation/data/damagetypes"-files..

Due to the state of D1938, this has become obselete :)

Jun 19 2019, 7:37 AM
Freagarach updated the diff for D1938: Easier introduction of new damage types..
  • Simplified armour checks.
  • Taught AI where to look for armour.
  • dTTT in "Tooltips.js".
  • Some "var" to "let".
Jun 19 2019, 7:36 AM
Freagarach added inline comments to D1938: Easier introduction of new damage types..
Jun 19 2019, 7:35 AM
Freagarach added inline comments to D1938: Easier introduction of new damage types..
Jun 19 2019, 7:01 AM
Nescio added a comment to D2000: aura style corrections.

Thanks, I guessed that was possibly the case, but I wasn't sure.
Anyway, to avoid future confusion, I've inserted a tiny section in the CC:
https://trac.wildfiregames.com/wiki/Coding_Conventions?action=diff&version=42
Feel free to correct, or revert if I wasn't allowed to.

Jun 19 2019, 12:31 AM
Stan added a comment to D2000: aura style corrections.

Most of the time Anything between {} is part of an object. anything between [] is part of an array

Jun 19 2019, 12:23 AM
Nescio added a comment to D2000: aura style corrections.

Sorry, I'm not really familiar with js, nor can I safely say I know exactly the difference between objects and arrays.
What I did is follow D1953#81077.

Jun 19 2019, 12:15 AM

Jun 18 2019

elexis added a comment to D2000: aura style corrections.

spaces inside brackets, e.g. [ "Ship" ] instead of ["Ship"]

(The JS code has these spaces for obejcts but not arrays, Coding_Conventions#JavaScript recommends it for objects but doesn't speak on arrays. So if you would want to make it more consistent, JS arrays be updated too or those spaces ommitted. I suppose one can add that to the CC so that people don't have to become familiar with the large codebase in order to be able to apply the consistency rule of the CC.)

Jun 18 2019, 11:19 PM
Stan added inline comments to D2001: [AI] Small cleanup in defenseManager.
Jun 18 2019, 10:03 PM
Stan added inline comments to D1938: Easier introduction of new damage types..
Jun 18 2019, 10:00 PM
Silier added a reviewer for D2001: [AI] Small cleanup in defenseManager: Restricted Owners Package.
Jun 18 2019, 8:51 PM
Vulcan added a comment to D1938: Easier introduction of new damage types..

Successful build - Chance fights ever on the side of the prudent.

Jun 18 2019, 8:45 PM
Freagarach updated the diff for D1938: Easier introduction of new damage types..

Forgot a few lines in "Headquarters.js".

Jun 18 2019, 8:44 PM
Freagarach added a comment to D1938: Easier introduction of new damage types..
In D1938#83103, @Angen wrote:

common-ai is supposed to be independent from any ai created upon it.

what do you want to do ?
did not damages.js work?

Jun 18 2019, 8:40 PM
Vulcan added a comment to D1938: Easier introduction of new damage types..

Successful build - Chance fights ever on the side of the prudent.

Jun 18 2019, 8:40 PM
Freagarach updated the diff for D1938: Easier introduction of new damage types..

Could not stand not figuring out the PetraAI.

Jun 18 2019, 8:38 PM
Vulcan added a comment to D2001: [AI] Small cleanup in defenseManager.

Successful build - Chance fights ever on the side of the prudent.

Jun 18 2019, 8:31 PM
Silier created D2001: [AI] Small cleanup in defenseManager.
Jun 18 2019, 8:29 PM
Silier added a comment to D1938: Easier introduction of new damage types..

common-ai is supposed to be independent from any ai created upon it.

Jun 18 2019, 8:16 PM
Nescio added a comment to D1965: Allow instant-kill for attacks. (And use it for "Slaughter"-attack.).

This would allow enabling special resistances in the future - a unit invulnerable to some damage type shouldn't be killed even if the attack is "instant-kill".

Sounds great (e.g. structures immune to pierce damage)!

Jun 18 2019, 8:01 PM
LordGood committed rP22391: may have forgotten an actor file, also areca palms .
may have forgotten an actor file, also areca palms
Jun 18 2019, 7:57 PM
Freagarach added a comment to D1938: Easier introduction of new damage types..
In D1938#83100, @Stan wrote:

Well if you can fix the ai that's nice.

Hmm, I'm trying, but it doesn't go smooth ;)
I'm using the "config.js" since that is the most logical place to store the "damage importance values", IMHO. But it seems that I can't call that "config" from "entityExtend.js". Many (other) managers are started with the "config" as an element in it's function.
I think it is best to leave it at this for now.

Jun 18 2019, 7:49 PM
Stan added a comment to D1938: Easier introduction of new damage types..

Well if you can fix the ai that's nice.

Jun 18 2019, 7:14 PM
Vulcan added a comment to D1938: Easier introduction of new damage types..

Successful build - Chance fights ever on the side of the prudent.

Jun 18 2019, 6:53 PM
Freagarach updated the diff for D1938: Easier introduction of new damage types..

Helptext in helper :)

Jun 18 2019, 6:52 PM
Freagarach added a comment to D1938: Easier introduction of new damage types..

Looks good - I'll test when I can and commit it.

Should I also try to fix "PetraAI"? It currently has the "damageTypes" hardcoded in its "entityExtend.js" with an importance factor.

Jun 18 2019, 6:51 PM
Stan added inline comments to D1938: Easier introduction of new damage types..
Jun 18 2019, 6:35 PM