IDE + IPL to VC:MP XML Converter (ChatGPT Prompt)

Started by Adrenaline, Today at 05:34 AM

Previous topic - Next topic

Adrenaline

This is a useful prompt for converting GTA Vice City map mods from .IDE + .IPL into VC:MP objects.xml and map.xml.



Prompt

You are converting GTA Vice City map mods (.IDE + .IPL) into VC:MP XML format.

IMPORTANT:
- Ask the user which .COL files they really have.
- Ask the user which .TXD files they really have.
- Never invent .col filenames.
- Never create collision paths from TXD names.
- If a .COL does not exist, use <collision type="none"/>.
- Final assets must be packed inside store/name_unp.7z.

VC:MP ID SYSTEM:

MODEL ID = 6000 + OBJECT ID

Examples:
object id 0 = model 6000
object id 1 = model 6001
object id 400 = model 6400
object id 1000 = model 7000

If the map starts at model 6400:
object ids must start at 400.

IDE:
The .IDE file defines object names, DFF models, TXD textures and COL collisions.

IPL:
The .IPL file contains object placements, coordinates and rotations.

OBJECTS.XML FORMAT:

<objectlist>
    <object id="400">
        <flags value="0"/>
        <texture path="shared.txd"/>
        <collision path="shared.col" name="object_name"/>
        <model path="object_name.dff" distance="300"/>
    </object>
</objectlist>

LOD RULES:

If object name starts with LOD, LODh or lod:
- use distance="3000"
- use confirmed shared collision
or:
- use <collision type="none"/>

MAP.XML FORMAT:

<map>
    <itemlist>
        <item model="6400" name="object_name">
            <position x="100" y="200" z="15"/>
            <rotation format="axisangle" x="0" y="0" z="0" angle="1"/>
        </item>
    </itemlist>
</map>

Rules:
- object IDs must be sequential
- all IDs must be unique
- model id = 6000 + object id
- map model ids must match objects.xml ids
- preserve IPL coordinates exactly
- preserve IPL rotations exactly
- preserve scale if available
- texture path must use real TXD files only
- collision path must use real COL files only

Before exporting:
- verify every TXD exists
- verify every COL exists
- verify every collision path is valid
- verify no fake .col names were generated
- verify all IDs are unique
- verify all map model references exist

PACKAGE STRUCTURE:

store/
└── MapPack_unp.7z

Inside the .7z:
- all .dff files
- all .txd files
- all .col files

Outside the .7z:
- objects.xml
- map.xml

Never randomize IDs.
Never duplicate IDs.
Never break model ↔ map references.
Always maintain exact IPL placement data.



My Discord adrenaline12

Adrenaline

2DFX Support Prompt (Optional)

If you want ChatGPT to also convert GTA Vice City 2DFX lights/coronas into VC:MP XML object effects, use this prompt below the main converter prompt:

--------------------------------------------------
VC:MP 2DFX XML FORMAT
--------------------------------------------------

VC:MP supports 2DFX effects inside objects.xml.

2DFX effects must be written INSIDE the related object:

<object>
    ...
    <effect>
        ...
    </effect>
</object>

Do NOT place 2DFX in map.xml.

--------------------------------------------------
2DFX CONVERSION RULES
--------------------------------------------------

The IDE may contain a:

2dfx

section.

Each 2DFX entry belongs to an object model.

When converting:
- remap original model IDs to the new VC:MP model IDs
- attach effects to the matching object definition
- preserve local offsets
- preserve RGB colour
- preserve alpha if applicable
- preserve corona texture
- preserve shadow texture
- preserve light parameters

--------------------------------------------------
VC:MP LIGHT EFFECT FORMAT
--------------------------------------------------

Example:

<effect>
    <position x="0" y="0" z="0"/>
    <colour r="255" g="255" b="255" a="200"/>
    <type>0</type>

    <light>
        <distance>450</distance>
        <outerrange>12</outerrange>
        <size>1</size>
        <innerrange>4</innerrange>
        <shadowintensity>40</shadowintensity>
        <flash>1</flash>
        <wet>1</wet>
        <flare>0</flare>
        <flags>1</flags>
        <corona>coronastar</corona>
        <shadow>shad_exp</shadow>
    </light>
</effect>

--------------------------------------------------
SUPPORTED TYPES
--------------------------------------------------

type 0 = light
type 1 = particle

--------------------------------------------------
IMPORTANT
--------------------------------------------------

2DFX entries are local offsets relative to the object origin.

Do NOT convert them as normal map placements.
Do NOT place them in map.xml.
Always attach them to the matching object inside objects.xml.

Adrenaline

VC:MP Rotation Fix Prompt (AxisAngle Rotation Preservation)

If your converted GTA Vice City maps have:
- rotated objects
- twisted ramps
- broken roads
- tilted buildings
- incorrect LOD orientation
- random object angle corruption

use this prompt below the main VC:MP converter prompt.

--------------------------------------------------
VC:MP ROTATION FIX RULES
--------------------------------------------------

When converting GTA Vice City maps (.IDE + .IPL)
to VC:MP XML format:

ALWAYS preserve original object rotations exactly.

--------------------------------------------------
IMPORTANT ROTATION RULE
--------------------------------------------------

VC:MP may incorrectly interpret some rotations
when quaternion conversion is used.

To avoid:
- rotated ramps
- broken roads
- tilted objects
- twisted buildings
- incorrect LOD orientation

ALWAYS use:

<rotation format="axisangle" />

inside map object entries.

--------------------------------------------------
CORRECT FORMAT
--------------------------------------------------

Example:

<object id="6400" model="400">
    <position x="0" y="0" z="0"/>
   
    <rotation format="axisangle"
        x="0"
        y="0"
        z="1"
        angle="90"/>

    <interior>0</interior>
</object>

--------------------------------------------------
IMPORTANT CONVERSION RULES
--------------------------------------------------

- preserve original IPL rotation values
- preserve original object orientation
- do NOT normalize rotations
- do NOT auto-convert to quaternion
- do NOT swap axes
- do NOT invert X/Y/Z
- do NOT reinterpret GTA rotations
- do NOT recalculate angles

--------------------------------------------------
LOD RULES
--------------------------------------------------

For LOD objects:

- preserve identical rotation
- preserve identical position
- keep visibility high (3000)
- use:

<collision type="none"/>

--------------------------------------------------
OBJECT ID RULES
--------------------------------------------------

VC:MP map IDs must follow:

map ID = object ID + 6000

Examples:

object 0   -> map 6000
object 1   -> map 6001
object 400 -> map 6400

Always continue IDs sequentially.
Never duplicate IDs.

--------------------------------------------------
FINAL RESULT
--------------------------------------------------

Correct conversion should prevent:
- object rotation bugs
- ramps facing wrong direction
- floating roads
- broken stunt maps
- twisted LODs
- corrupted map orientation

and preserve stable VC:MP compatibility.