Skip to content

Changing beginning xp in campaign

Wizer13Wizer13 Member Posts: 65
Hi, everyone. One little question since I can't find info on the subject.

I'm creating a new campaign for BG2EE and I want to modify the starting xp of new players to 0, since I want them to start at level 1. I know how to set the Xp Cap in my coding, but if I make a modification in my tp2 to the STARTXP file, it would affect any other new game. Is there a way to code the starting xp at 0 only when my campaign begins? If so, how should I code this? Thanks for your time!

Comments

  • The user and all related content has been deleted.
  • Wizer13Wizer13 Member Posts: 65
    Thx! I'll try it this week-end.
  • Wizer13Wizer13 Member Posts: 65
    Okay I had time to check it out. I want to make sure I understand what to do since I'm a newbie. If I figured it out, it will copy the STARTARE.2DA and set the xp to normal if it starts a bg2 game .

    The second one would be my .2DA, which would copy the STARTARE.2DA set the xp to 0 (If I replace the 1000). I guess with the same 2DA I would also be able to determine the starting area and the position of the character, right?

    Thanks for your time. :)
  • ArunsunArunsun Member Posts: 1,592
    edited February 2018
    The first block will check if your game is BG2EE, and if that's the case do what's below.
    The second one is essentially the same in what it does, except it does that for Black Pits.

    Now as to what's within these blocks, let's take it line by line:
    COPY_EXISTING ~xxx~ ~yyy~ will copy the file xxx into the folder yyy. Here, xxx is the .2da file that manages, among other things, the starting experience, and yyy is the override folder, where files from mods etc... are put just about all the time. Then COPY_EXISTING will do what's indented below it

    Now, 2da are essentially tables, much like that of Excel, except written in text. 2da means 2-dimensional array, not that this is essential though :smile: . set_2da_entry x y z ~p~ will change the value of the table slot with coordinates x (row) and y(column) to "p". z is the "required column count" which means only rows with at least z column will be taken into account.
    Here, if you check the file that was mentioned above (STARTARE.2DA), using NearInfinity for example, you will notice that the starting experience is actually on the 2nd column and 13th row. That's because, as in most coding languages, WeiDu reads tables with coordinates starting at 0. Be doubly careful about that, I have had countless issues with that. That's the type of issues you can't find and spend hours on, and when you figure it out you feel like being stupid. If you've done some coding on other domains I'm sure you know what I mean :smiley:

    The BUT_ONLY is a shortened version of BUT_ONLY_IF_IT_CHANGES which is quite tedious to write. The longer version is pretty self-explanatory though.


    EDIT: Here's the WeiDu documentation, you'll probably need it, the bedside book of every self-respecting modder: http://www.weidu.org/~thebigg/README-WeiDU.html
  • Wizer13Wizer13 Member Posts: 65
    Thank you deeply, Arunsun!
Sign In or Register to comment.