chipchip on mauve herbs

Ask for help regarding any technical issue or report any bug or OS independent issues.
User avatar
Jenalya
TMW Adviser
TMW Adviser
Posts: 717
Joined: 22 Sep 2010, 19:28

Re: chipchip on mauve herbs

Post by Jenalya »

I have looked at the spawn definitions of Mauve Plants ("MauvePlant" is the value given in mob_db.txt), and found
- "Mauve Herb" 11 times
- "Mauve" 2 times
- "Mauve Plant" 3 times

In magic.conf there is

Code: Select all

PROCEDURE shear-drop(target, target2, item, prob) =
                     IF (target = name || target2 = name)
                     THEN (IF (score < prob)
                           THEN drop_item_for(place, item, 1, 60000, caster, 5000);)
[...]
CALL shear-drop("Mauve", "MauvePlant",			"MauveHerb", 700);
I'm not sure if I understood correctly, but does the magic spell check if the monster's spawn name given in the spawn definition matches target or target2? If so, then there are only the two spawns called "Mauve" which can work, unless it ignores whitespaces in the name.
I also noticed that some of the other calls use a whitespace in their name, e.g.

Code: Select all

CALL shear-drop("SpikyMushroom", "Spiky Mushroom",	"HardSpike", 250);
Overall, I'm confused about this, can someone explain how which name depends on what?
tsukinokage wrote:Long ago, I submit a commit and fixed the problem of #chipchip not working on the newly added maps for mouboos because of typo in the spawn area name. That commit was accepted, but my suggestion in the pull request about changing the server code so that it won't depend on the name of the spawn area(which I think is a really bad idea, since we can use any string in the spawn area name) is just ignored.
Did I accept that patch, or someone else? Because if I did, I might have overseen your suggestion, or didn't understand it. Because usually I try to address that kind of suggestion in some way... If you have the impression of being ignored, please feel free to ask again, sometimes things just slip the attention.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: chipchip on mauve herbs

Post by o11c »

Jenalya wrote:I'm not sure if I understood correctly, but does the magic spell check if the monster's spawn name given in the spawn definition matches target or target2? If so, then there are only the two spawns called "Mauve" which can work, unless it ignores whitespaces in the name.
I also noticed that some of the other calls use a whitespace in their name, e.g.

Code: Select all

CALL shear-drop("SpikyMushroom", "Spiky Mushroom",	"HardSpike", 250);
Overall, I'm confused about this, can someone explain how which name depends on what?
The target/target2 thing is a hack to work around the problem that names *are* dependent.

The only *true* dependency is between the name in _mobs.txt and the name in magic.conf, but for sanity that should also match the entry in mob_db.txt. (it is the ID number in _mobs.txt that looks up the entry in mob_db.txt)

The fact that there are two names in mob_db.txt is just confusing, and it is inconsistent whether both can work or just one.

Fixing name handling is on my list, but needs to wait until after the script rewrite ...
Former programmer for the TMWA server.
User avatar
Nard
Knight
Knight
Posts: 1113
Joined: 27 Jun 2010, 12:45
Location: France, near Paris

Re: chipchip on mauve herbs

Post by Nard »

o11c wrote:Nard, I know a lot about the server code - far more than you can glean from my forum posts.

This problem can easily be fixed in server data, not server code.
I have no doubt about it o11c. But you suggested in your answer to tsukinokage, that this issue (*), could require a heavy change in code. I could do nothing but trust you :?

(*) because it is indeed an issue, isn't it?
"The language of everyday life is clogged with sentiment, and the science of human nature has not advanced so far that we can describe individual sentiment in a clear way." Lancelot Hogben, Mathematics for the Million.
“There are two motives for reading a book; one, that you enjoy it; the other, that you can boast about it.” Bertrand Russell, Conquest of Happiness.
"If you optimize everything, you will always be unhappy." Donald Knuth.
tsukinokage
Peon
Peon
Posts: 32
Joined: 19 Sep 2012, 03:12

Re: chipchip on mauve herbs

Post by tsukinokage »

Jenalya wrote:Did I accept that patch, or someone else? Because if I did, I might have overseen your suggestion, or didn't understand it. Because usually I try to address that kind of suggestion in some way... If you have the impression of being ignored, please feel free to ask again, sometimes things just slip the attention.
No, it was o11c that accept that patch.
The suggestion is still here:
https://github.com/themanaworld/tmwa-cl ... t-10626685
but I won't resubmit it, since o11c said that it is supposed to break the code, and also I'm not really care about whether it'll get fixed. I no longer play TMW, and if I have spare time, I'll try merge tmw-eathena and manaserv, that's why my fork of tmw-eathena gradually uses a language similar to lua for magic. I just came here when I'm boring and see if there're something new here.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: chipchip on mauve herbs

Post by o11c »

conversion script is now fixed.
Former programmer for the TMWA server.
User avatar
bekka
Peon
Peon
Posts: 27
Joined: 11 Sep 2012, 18:17

Re: chipchip on mauve herbs

Post by bekka »

Jenalya wrote:I have looked at the spawn definitions of Mauve Plants ("MauvePlant" is the value given in mob_db.txt), and found
- "Mauve Herb" 11 times
- "Mauve" 2 times
- "Mauve Plant" 3 times

In magic.conf there is

Code: Select all

PROCEDURE shear-drop(target, target2, item, prob) =
                     IF (target = name || target2 = name)
                     THEN (IF (score < prob)
                           THEN drop_item_for(place, item, 1, 60000, caster, 5000);)
[...]
CALL shear-drop("Mauve", "MauvePlant",			"MauveHerb", 700);
I'm not sure if I understood correctly, but does the magic spell check if the monster's spawn name given in the spawn definition matches target or target2? If so, then there are only the two spawns called "Mauve" which can work, unless it ignores whitespaces in the name.
I also noticed that some of the other calls use a whitespace in their name, e.g.

Code: Select all

CALL shear-drop("SpikyMushroom", "Spiky Mushroom",	"HardSpike", 250);
Overall, I'm confused about this, can someone explain how which name depends on what?

So this means, the name Mauve in the code needs to be changed?
User avatar
Nard
Knight
Knight
Posts: 1113
Joined: 27 Jun 2010, 12:45
Location: France, near Paris

Re: chipchip on mauve herbs

Post by Nard »

Wrong names will be fixed soon:
o11c authored 2 days ago: Handle wrong mob names in map spawns

However it would be nice to have an answer to Jenalyas question :)
"The language of everyday life is clogged with sentiment, and the science of human nature has not advanced so far that we can describe individual sentiment in a clear way." Lancelot Hogben, Mathematics for the Million.
“There are two motives for reading a book; one, that you enjoy it; the other, that you can boast about it.” Bertrand Russell, Conquest of Happiness.
"If you optimize everything, you will always be unhappy." Donald Knuth.
User avatar
Jenalya
TMW Adviser
TMW Adviser
Posts: 717
Joined: 22 Sep 2010, 19:28

Re: chipchip on mauve herbs

Post by Jenalya »

We've updated the monster spawn definitions on both client-data and server-data to match the names from mob_db. Since at least one of the names given in the magic.conf matches the actual monster name, #chipchip should work on all maps after the next release.
The fixes o11c did on the converter will now warn if the name of the spawn definition in a map doesn't match the name from mob_db.

Thanks for the report, bekka! :)
Post Reply