project-navigation
Personal tools

Author Topic: Problems modding weapons and techtree  (Read 16047 times)

Offline tobbe

  • Rookie
  • ***
  • Posts: 89
    • View Profile
Problems modding weapons and techtree
« on: April 11, 2010, 04:56:35 pm »
Hi, i am trying to modify some weapon and tech scripts a little bit and i encountered some problems i wasnt able to find a solution via the wiki...maybe somebody around could help?

1. I want to move some initial weapons (and their tech) to a later time in the campaign. I removed the entries (e.g. riotshot gun) in researched list, equipment campaign_player and equipment campaign_initial_market, but i still start with a riot shotgun...any way to change this without coding?

2. I want to move some starting techs (e.g. combat armor) to a later time by adding a research_AND...but every time i try this, the geoscape crashes and i dont understand why.

3. I want to use the multiplayer weapons (changed of course) in the campaign...i changed the research time to 0 (in research.ufo), moved the entries from weapons_multiplayer.ufo to weapons_human.ufo. that seems to work kind of...but once i change the research value to a positve value, geoscape crashes again.

The geoscape chrash happen in two ways:
a) once i start a new campaign, i build my first base, it is placed, but cant be chosen. Every time i try to pick the base, a new base will be built. (most of the time)
b) geoscape wont appear at all (rare)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Problems modding weapons and techtree
« Reply #1 on: April 11, 2010, 05:20:19 pm »
sorry, but "geoscape crashes" isn't enough info - there should be console output, we need that.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Problems modding weapons and techtree
« Reply #2 on: April 11, 2010, 05:22:08 pm »
What version of the game are you trying to modify?

Edit:  And yes, many of the messages that appear in the console (and log file in your APPDATA path) will give info that will help with where you went wrong - For example, if you incorrectly alter a research .ufo script, the console may give a specific error message that helps determine what happened.

« Last Edit: April 11, 2010, 05:24:18 pm by Destructavator »

Offline tobbe

  • Rookie
  • ***
  • Posts: 89
    • View Profile
Re: Problems modding weapons and techtree
« Reply #3 on: April 11, 2010, 05:32:36 pm »
sorry, but "geoscape crashes" isn't enough info - there should be console output, we need that.

well, the problem is that there arent any "real" error messages or obvious console messages...as i wrote: mostly the game wont accept the first base placement...but i will repeat my modding again and will try to access the console...but how do i get to the console??

version: 2.3 r29222

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Problems modding weapons and techtree
« Reply #4 on: April 11, 2010, 05:34:37 pm »
Please read through the wiki - it describes how to use the console, what commands you can use to test things, and where the log file is saved when/if the program crashes or malfunctions.

Offline tobbe

  • Rookie
  • ***
  • Posts: 89
    • View Profile
Re: Problems modding weapons and techtree
« Reply #5 on: April 11, 2010, 05:39:48 pm »
Please read through the wiki - it describes how to use the console, what commands you can use to test things, and where the log file is saved when/if the program crashes or malfunctions.


well, already tried that...but i will try again...:)

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Problems modding weapons and techtree
« Reply #6 on: April 11, 2010, 05:41:15 pm »
It should be in the wiki...  If not, well - Hang on a sec...

Here:
http://ufoai.ninex.info/wiki/index.php/Console

At the end of that entry are two links that give more information on what you can do in the console.
« Last Edit: April 11, 2010, 05:43:01 pm by Destructavator »

Offline tobbe

  • Rookie
  • ***
  • Posts: 89
    • View Profile
Re: Problems modding weapons and techtree
« Reply #7 on: April 11, 2010, 07:03:31 pm »
It should be in the wiki...  If not, well - Hang on a sec...

Here:
http://ufoai.ninex.info/wiki/index.php/Console

At the end of that entry are two links that give more information on what you can do in the console.


tyvm...i will try to reproduce the errors :)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Problems modding weapons and techtree
« Reply #8 on: April 11, 2010, 07:11:02 pm »
please also see this http://ufoai.ninex.info/wiki/index.php/Bugs

the ufoconsole.log might help us to help you ;)

Offline tobbe

  • Rookie
  • ***
  • Posts: 89
    • View Profile
Re: Problems modding weapons and techtree
« Reply #9 on: April 11, 2010, 07:43:28 pm »
ok, i will do my very best :) i will keep you informed...one last thing about this: should i post possible errors to the bugtracker? as these errors are not from game itself, but errors by changing the scripts?!

but for my problem 1: i think i just forgot to remove/change something...maybe somebody with a better knowlegde about the scripting funktions might help me, as it isnt really an error:

i want to move some of the initial weapons to a later time (by adding a research_AND to the tech)...i already did:

1. remove the item and its ammo from the equipment campaign_player list in equipment.ufo
2. remove the information researched rslist_phalanx in researched_list.ufo
3. add the researched_AND to the tech

it works so far quite ok, as the tech is not shown in the ufopedia anymore and there are no weapons on the market to buy.

But there are still soldiers equiped with the weapons, though they are labeled "unknown - not usable"...so i think i just forgot to change one link to the scripts...but where?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Problems modding weapons and techtree
« Reply #10 on: April 11, 2010, 07:58:00 pm »
depends - if you have a bug due to script changes, first post it here - if it turns out to be an engine bug, it should go to the tracker. if you are making script changes, you should use svn and post patches (svn diff base/ufos > myPatch.diff or Tortoise Diff feature). looking at the patch might help us to find the errors in the changes (if there are any)

Offline tobbe

  • Rookie
  • ***
  • Posts: 89
    • View Profile
Re: Problems modding weapons and techtree
« Reply #11 on: April 11, 2010, 09:25:00 pm »
depends - if you have a bug due to script changes, first post it here - if it turns out to be an engine bug, it should go to the tracker. if you are making script changes, you should use svn and post patches (svn diff base/ufos > myPatch.diff or Tortoise Diff feature). looking at the patch might help us to find the errors in the changes (if there are any)

Well, to use SVN i would have to understand how that works...and i have absolutely no clue about coding or using SVN^^ I will have to have a closer look at the tutorials about using SVN...that will take some time ;)

For now, the information about the console were already REALLY helpful as i identified my main source of troubles: i removed items from the researched list without removing them from initial campaign equipment...that caused most of my crashes :)

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Problems modding weapons and techtree
« Reply #12 on: April 11, 2010, 09:34:06 pm »
SVN is actually rather simple - If you can figure out playing around with the .ufo script files you shouldn't take too long getting an SVN client and making it work.

Knowing how SVN works doesn't really need coding knowledge, myself I figured it out before learning anything about C or C++ (the languages this project is written in).

Compiling the game though - on Windows - from SVN can be a bit more difficult though.  If you get stuck on any step doing that, let us know where things fell apart.

Offline Legendman3

  • Sergeant
  • *****
  • Posts: 306
    • View Profile
Re: Problems modding weapons and techtree
« Reply #13 on: April 11, 2010, 09:52:46 pm »
Yah i know nothing about coding but i could use SVN fine. I mean nothinnnnnnnnnnnnnnnng about coding thats how simple it is.

Offline DiDiT

  • Squad Leader
  • ****
  • Posts: 149
  • Your local Flame-thrower wielding Furry.
    • View Profile
Re: Problems modding weapons and techtree
« Reply #14 on: April 11, 2010, 11:30:00 pm »
dave and legand are right, the svn is preaty simple, even on windows.

then again, you could always just get mutons build script and use the svn in that...