#How to add custom elements into custom materials?

28 messages · Page 1 of 1 (latest)

solar dust
#

I ran into a new issue, I tried to replicate GT:NH's Black Plutonium, so I coded:

GTCEuStartupEvents.registry('gtceu:element', event => {

    event.create('sp')
        .protons(1000000)
        .neutrons(1000000)
        .halfLifeSeconds(-1)
        .decayTo(null)
        .symbol('Sp')
        .isIsotope(false)

})

GTCEuStartupEvents.registry('gtceu:material', event => {

    event.create('black_plutonium')
        .ingot()
        .components('1x sp', '1x plutonium')
        .color(0x222222).iconSet(GTMaterialIconSet.ROUGH)
        .flags(
            GTMaterialFlags.GENERATE_PLATE
    )
})

But the actual result presented is like the attatched image.

It only has plutonium in it.

GT Modern Version: v7.4.1

lean viper
#

e.g.

        Copper = new Material.Builder(GTCEu.id("copper"))
                .ingot(1)
                .liquid(new FluidBuilder().temperature(1358))
                .ore()
                .color(0xe77c56).secondaryColor(0xe4673e).iconSet(BRIGHT)
                .appendFlags(EXT_METAL, MORTAR_GRINDABLE, GENERATE_SPRING, GENERATE_SPRING_SMALL, GENERATE_RING,
                        GENERATE_FINE_WIRE, GENERATE_ROTOR)
                .element(GTElements.Cu)
                .cableProperties(V[MV], 1, 2)
                .fluidPipeProperties(1696, 6, true)
                .buildAndRegister();

#

by saying .element it's a material for an element

#

then with that you can make composites

solar dust
#

the .element() is the same as the .element() in material registry?
like .element('sp')

lean viper
#

yeah

solar dust
#

let me try this, wait a few second

lean viper
#

they might have to be in differnet idfles with priorities? not 100% sure

solar dust
#
Sp = new Material.Builder(GTCEu.id('sp'))
    .liquid(new FluidBuilder().temperature(100000))
    .color(0x00000)
    .iconSet(ROUGH)
    .appendFlags(EXT_METAL)
    .element('sp')
    .buildAndRegister();

like this? im a bit confused now

lean viper
#

what I sent is java code, you'd need to find some equivalent js code

#

lemme see if I can find some

solar dust
#

ok

#

you still there?

lean viper
#

Couldn't find some easily in existing repos sadly. try something like

GTCEuStartupEvents.registry('gtceu:element', event => {

    event.create('sp')
        .protons(1000000)
        .neutrons(1000000)
        .halfLifeSeconds(-1)
        .decayTo(null)
        .symbol('Sp')
        .isIsotope(false)

})

GTCEuStartupEvents.registry('gtceu:material', event => {

    event.create('cosmic_neutronium')
        .ingot()
        .element(GTElements.get('sp'))
        .color(0x222222).iconSet(GTMaterialIconSet.ROUGH)
        .flags(
            GTMaterialFlags.GENERATE_PLATE
    )

    event.create('black_plutonium')
        .ingot()
        .components('1x cosmic_neutronium', '1x plutonium')
        .color(0x222222).iconSet(GTMaterialIconSet.ROUGH)
        .flags(
            GTMaterialFlags.GENERATE_PLATE
    )
})
#

something like that

solar dust
#

wait

#

i got it

#

earlier

#

we're thinking the same solution

#

solved

GTCEuStartupEvents.registry('gtceu:element', event => {

    event.create('pure_plutonium')
        .protons(1000000)
        .neutrons(1000000)
        .halfLifeSeconds(-1)
        .decayTo(null)
        .symbol('Pu')
        .isIsotope(false)

    event.create('sp')
        .protons(1000000)
        .neutrons(1000000)
        .halfLifeSeconds(-1)
        .decayTo(null)
        .symbol('Sp')
        .isIsotope(false)

})

GTCEuStartupEvents.registry('gtceu:material', event => {
    
    event.create('sp')
        .element(GTElements.get('sp'))
        .color(0xffffff).iconSet(GTMaterialIconSet.DULL)
    
    event.create('pure_plutonium')
        .element(GTElements.get('pure_plutonium'))
        .color(0xffffff).iconSet(GTMaterialIconSet.DULL)

    event.create('black_plutonium')
        .ingot()
        .components('1x sp', '1x pure_plutonium')
        .color(0x222222)
        .secondaryColor(0x000000)
        .iconSet(GTMaterialIconSet.SHINY)
        .flags(
            GTMaterialFlags.GENERATE_PLATE
    )
})
lean viper
#

awesome hapybapycat

solar dust
#

thank you

mellow raptor
#

Space is already registered as a GTCEuM element along w/ magic

lean viper
mellow raptor
#

Oh, ok

solar dust