Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added spherecustom.ini definition #1310

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

xwerswoodx
Copy link
Contributor

@xwerswoodx xwerswoodx commented Oct 16, 2024

  • Added: spherecustom.ini definition has been added to Sphere.
  1. This allows you to override Sphere settings without touching the Sphere.ini file.

  2. For example, when you want to switch from an older Sphere version to 56x or when you haven't updated for a long time, instead of checking all the new data added to Sphere.ini one by one, you can simply use your old sphere.ini as spherecustom.ini. This way, newly added data will take the default settings from Sphere.ini, while your previous custom settings will override the defaults without requiring any further adjustments.

  3. On the other hand, it helps you maintain a clean Sphere.ini. Instead of directly changing the Sphere.ini settings, you can create a spherecustom.ini file and add only the settings you want to change there, allowing you to easily track the changes without modifying Sphere.ini.

  4. Here's an example of a spherecustom.ini:

[SPHERE]
AGREE=1

// Server Data
ServName=MyCuteServer
ServIP=255.255.255.255
ServPort=2593

// Server Settings
AdvancedLos=2
GuardsInstantKill=0
FeatureT2A = 01|02

[SERVERS]
MyCuteServer
255.255.255.255
2593

[EOF]

Fixed: The mismatched default value check was causing the price of items without a set price to return as -2,147,483,648. (Issue: #1233)
Changed: Now CHARDEFs can read custom Item Resources as an ICON, the restriction of being TILEDATA value is removed. (Issue: #1301)

@Jhobean
Copy link
Contributor

Jhobean commented Oct 16, 2024

That mean if value are at 2 places server will priorize spherecustom.ini?

@xwerswoodx
Copy link
Contributor Author

Yes, if you put any data in spherecustom.ini, will override the value in sphere.ini, for example if you put ServName to MyCuteServer like in example, even it's MyShard in sphere.ini, <SERV.NAME> will return as MyCuteServer

@cbnolok
Copy link
Contributor

cbnolok commented Oct 17, 2024

Actually i don't really get the usefulness of this proposed feature (spherecustom.ini), because sphere already has hardcoded defaults for every ini setting. It reads the ini file and overwrites the defaults with the values it finds in that ini, otherwise it uses the defaults it already has. It's already done in that way, as far as i can see.

@xwerswoodx
Copy link
Contributor Author

xwerswoodx commented Oct 18, 2024

Member

I added that because I thought same but while I was testing Sphere crashes automatically without giving an error on launch when you just put

[SPHERE]
AGREE=1

// Server Data
ServName=MyCuteServer
ServIP=127.0.0.1
ServPort=2593

ScpFiles=scripts/
WorldSave=save/
AcctFiles=accounts/
MulFiles=C:/Program Files (x86)/Electronic Arts/Ultima Online Classic/
Log=logs/

[SERVERS]
MyCuteServer
127.0.0.1
2593

[EOF]

values inside.

@xwerswoodx
Copy link
Contributor Author

xwerswoodx commented Oct 18, 2024

Okay anyway I noticed the issue is because of one/couple of these definations;

Map0=7168,4096,-1,0,0		//ML size

Edit: seems like if you don't define map0 in sphere.ini it loops infinitely and crashes sphere on launch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants