bemaniutils icon indicating copy to clipboard operation
bemaniutils copied to clipboard

Cannot change SDVX shop name/region name

Open hexadiver opened this issue 4 years ago • 15 comments

In SDVX the shop/region name is shown as 3 orange stars, but when running locally its blank, Is there a way to change this? edit : its called the area name in the test menu

hexadiver avatar Sep 05 '21 18:09 hexadiver

I'm not actually sure. I know you can change the shop name in network options, but area should be based on the prefecture of the server. There isn't a config for that, maybe there should be?

DragonMinded avatar Sep 06 '21 18:09 DragonMinded

It looks like this is set by a combination of location/country and location/region in the facility.get message, which I'm unaware of any network handling properly. I'll figure it out and see if I can't get it settable.

DragonMinded avatar Sep 07 '21 01:09 DragonMinded

https://github.com/DragonMinded/bemaniutils/commit/d05c3f907dfa18abd634c0197db63378a0cc161a and https://github.com/DragonMinded/bemaniutils/commit/c7affef159c268f0f4b5c9f7e500cf88147f87cb combined should allow you to change the area for all games connected to your server or in your arcade. Give it a test and see if it works for you.

DragonMinded avatar Sep 07 '21 02:09 DragonMinded

sqlalchemy.exc.OperationalError

sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1054, "Unknown column 'pref' in 'field list'") [SQL: SELECT name, description, pin, pref, data FROM arcade WHERE id = %s] [parameters: (1,)] (Background on this error at: https://sqlalche.me/e/14/e3q8)

I'm getting this error once I open the frontend

hexadiver avatar Sep 07 '21 10:09 hexadiver

Sounds like you didn't read the README. ./dbutils --config config/server.yaml upgrade should be run to upgrade your local schema when there are DB changes.

DragonMinded avatar Sep 07 '21 14:09 DragonMinded

Have you been able to confirm the updated functionality?

DragonMinded avatar Sep 10 '21 19:09 DragonMinded

i've tried but in game it says that my region is "不明" (unknown) and in the test menu my area is "未取得" (not obtained). in the front end my location is set to Hokkaido. i am testing locally right now, haven't had the time to upload the new version into my server so idk if that changes anything

also my apologies for replying late i was very busy with real life stuff..

hexadiver avatar Sep 11 '21 00:09 hexadiver

What version of SDVX does this? Some of them require a different mapping and its possible you're looking at one that wasn't corrected.

DragonMinded avatar Sep 11 '21 01:09 DragonMinded

SDVX Heavenly Haven, 2019020600

hexadiver avatar Sep 11 '21 01:09 hexadiver

would there be a way to choose a custom region name with this implementation?

hexadiver avatar Oct 03 '21 00:10 hexadiver

No, its a hardcoded list based on a few things in the facility packet.

DragonMinded avatar Oct 03 '21 01:10 DragonMinded

The area will be set from the fields regionname and regionjname in the response packet of facility.get:

<response>
    <facility status="0">
        <location>
            ...
            <regionname __type="str">CUSTOM_AREA_NAME</regionname>
            <regionjname __type="str">CUSTOM_AREA_NAME</regionjname>
            ...
        </location>
            ...
</response>

You can customize your area name here.

RinChanNOWWW avatar Feb 18 '22 05:02 RinChanNOWWW

You can add codes like:

location.add_child(Node.string('regionname', 'CUSTOM_AREA_NAME'))
location.add_child(Node.string('regionjname', 'CUSTOM_AREA_NAME'))

somewhere near

https://github.com/DragonMinded/bemaniutils/blob/90f3d9e1389e76c2d2078bf14a1eb0f351558b5f/bemani/backend/core/core.py#L169-L176

RinChanNOWWW avatar Feb 18 '22 05:02 RinChanNOWWW

You can add codes like:

location.add_child(Node.string('regionname', 'CUSTOM_AREA_NAME'))
location.add_child(Node.string('regionjname', 'CUSTOM_AREA_NAME'))

somewhere near

https://github.com/DragonMinded/bemaniutils/blob/90f3d9e1389e76c2d2078bf14a1eb0f351558b5f/bemani/backend/core/core.py#L169-L176

it changed in config/server.yaml

    # for details on acceptible values. The range of accepted values is 1-56 matching
    # the 56 normal regions found in RegionConstants, and 1000 for "Europe" and
    # 2000 for "Other".
    region: 56
``
so just change region in config.

wz18207 avatar Feb 18 '22 07:02 wz18207

You can add codes like:

location.add_child(Node.string('regionname', 'CUSTOM_AREA_NAME'))
location.add_child(Node.string('regionjname', 'CUSTOM_AREA_NAME'))

somewhere near https://github.com/DragonMinded/bemaniutils/blob/90f3d9e1389e76c2d2078bf14a1eb0f351558b5f/bemani/backend/core/core.py#L169-L176

it changed in config/server.yaml

    # for details on acceptible values. The range of accepted values is 1-56 matching
    # the 56 normal regions found in RegionConstants, and 1000 for "Europe" and
    # 2000 for "Other".
    region: 56
``
so just change region in config.

Sure, but the original codes will not set the area name (e.g., 北海道) which is at the front of the shop name (e.g., ROUND 1). Only if add fields regionname (and regionjname?) will change the area name.

image

Without the fields, the "AREA" will be "未取得" (which means "not obtained").

RinChanNOWWW avatar Feb 18 '22 09:02 RinChanNOWWW

Custom area should be fixed as of 85a3f08c781870384fa3ab39436f486da463f38f for games that support it, thanks to @RinChanNOWWW

DragonMinded avatar Oct 15 '22 22:10 DragonMinded